Closed

Description
The correctness
group is for: "code that is just outright wrong or very very useless, causes hard errors by default". Pushing with overwrite is part of the API and it's useful on occasion. There is no way that you can say that all code that does it is "outright wrong".
Another big problem with this lint suggestions isn't equivalent. If people blindly follow the suggestion they will actually introduce bugs into their code.
Here is my a counter example:
use std::path::PathBuf;
let mut path = PathBuf::new();
path.push("/etc");
assert_eq!(path, PathBuf::from("/etc"));
According to the lint, this code is "outright wrong" and should be replaced by:
use std::path::PathBuf;
let mut path = PathBuf::new();
path.push("etc");
assert_eq!(path, PathBuf::from("/etc"));
Metadata
Metadata
Assignees
Labels
No labels