Checks that a module’s items are either imported or qualified with the module’s path, but not both.
Mixing the two styles can lead to confusing code.
use std::env::var;
fn main() {
assert_eq!(var("LD_PRELOAD"), Err(std::env::VarError::NotPresent));
}
Instead, either use:
use std::env::{var, VarError};
fn main() {
assert_eq!(var("LD_PRELOAD"), Err(VarError::NotPresent));
}
Or use:
fn main() {
assert_eq!(
std::env::var("LD_PRELOAD"),
Err(std::env::VarError::NotPresent)
);
}