RS.CLIPPY.UNNECESSARY_OPERATION
Outer expressions with no effect
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: unnecessary_operation. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for expression statements that can be reduced to a sub-expression.
Why is this bad?
Expressions by themselves often have no side-effects. Having such expressions reduces readability.
Example
compute_array()[0];