Avoid Declaring First
Source: https://doc.rust-lang.org/rust-by-example/variable_bindings/declare.html
You can declare a variable first and later initialize it. However, it is better to avoid it as it may lead to using uninitialized variables. The examples below are adapted from the above source.
Don't write:
fn main() { let a_binding; let x = 2; // Initialize the binding a_binding = x * x; }
Do write:
fn main() { let x = 2; let a_binding = x * x; }