dylint

misleading_variable_name

What it does

Checks for variables satisfying the following three conditions:

Why is this bad?

A reader could mistakenly believe the variable has a type other than the one it actually has.

Example

let file = read_to_string(path).unwrap();

Use instead:

let contents = read_to_string(path).unwrap();