Fix allow on some statement lints
This commit is contained in:
parent
6d50cff45a
commit
f3e77a454a
6 changed files with 24 additions and 11 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use std::collections::{BinaryHeap, HashMap, LinkedList, VecDeque};
|
||||
use std::collections::{BinaryHeap, HashMap, HashSet, LinkedList, VecDeque};
|
||||
|
||||
fn main() {
|
||||
let sample = [1; 5];
|
||||
|
|
@ -75,3 +75,9 @@ mod issue7110 {
|
|||
buffer.len()
|
||||
}
|
||||
}
|
||||
|
||||
fn allow_test() {
|
||||
#[allow(clippy::needless_collect)]
|
||||
let v = [1].iter().collect::<Vec<_>>();
|
||||
v.into_iter().collect::<HashSet<_>>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,9 @@ fn main() {
|
|||
let s: String = "foo".into();
|
||||
FooString { s: s };
|
||||
|
||||
#[allow(clippy::no_effect)]
|
||||
0;
|
||||
|
||||
// Do not warn
|
||||
get_number();
|
||||
unsafe { unsafe_fn() };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue