rust-lang/rust-clippy
Vedi su GitHubPolitely mention that `Box<&T>` is almost the most useless type you can have
Open
#2394 aperta il 23 gen 2018
A-lintT-middlegood first issue
Metriche repository
- Star
- (10.406 star)
- Metriche merge PR
- (Merge medio 19g 22h) (113 PR mergiate in 30 g)
Descrizione
Found in the wild: https://stackoverflow.com/questions/48406077/mutation-of-a-variable-inside-while-loop
List of types that make no sense that we should be linting about:
Box<&T>Box::new(SomeT)wheresizeof::<T>() <= sizeof::<usize>()- unless there are
Box::into_rawcalls within the function
- unless there are
Rc<Box<T>>Rc<Rc<T>>Rc<&T>- more...?