You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>This rule finds variables that are never accessed. Unused variables should be removed to increase readability and avoid confusion.</p>
8
+
</overview>
9
+
10
+
<recommendation>
11
+
<p>Remove any unused variables.</p>
12
+
</recommendation>
13
+
14
+
<example>
15
+
<p>In the following example, there is an unused variable <code>average</code> that is never used:</p>
16
+
<samplesrc="UnusedVariableBad.rs" />
17
+
<p>The problem can be fixed simply by removing the variable:</p>
18
+
<samplesrc="UnusedVariableGood.rs" />
19
+
</example>
20
+
21
+
<references>
22
+
<li>GeeksforGeeks: <ahref="https://www.geeksforgeeks.org/how-to-avoid-unused-variable-warning-in-rust/">How to avoid unused Variable warning in Rust?</a></li>
0 commit comments