make cargo test pass

This commit is contained in:
Centri3 2023-06-10 06:54:00 -05:00
parent 26f50395ba
commit 7ba904245d
4 changed files with 87 additions and 55 deletions

View file

@ -1,7 +1,38 @@
[crates]
# some of these are from cargotest
bevy = {name = "bevy", versions = ['0.10.1']}
deno = {name = "deno", versions = ['1.34.2']}
cargo = {name = "cargo", versions = ['0.64.0']}
iron = {name = "iron", versions = ['0.6.1']}
ripgrep = {name = "ripgrep", versions = ['12.1.1']}
xsv = {name = "xsv", versions = ['0.13.0']}
# commented out because of 173K clippy::match_same_arms msgs in language_type.rs
#tokei = { name = "tokei", versions = ['12.0.4']}
rayon = {name = "rayon", versions = ['1.5.0']}
serde = {name = "serde", versions = ['1.0.118']}
# top 10 crates.io dls
bitflags = {name = "bitflags", versions = ['1.2.1']}
# crash = {name = "clippy_crash", path = "/tmp/clippy_crash"}
libc = {name = "libc", versions = ['0.2.81']}
log = {name = "log", versions = ['0.4.11']}
proc-macro2 = {name = "proc-macro2", versions = ['1.0.24']}
quote = {name = "quote", versions = ['1.0.7']}
rand = {name = "rand", versions = ['0.7.3']}
rand_core = {name = "rand_core", versions = ['0.6.0']}
regex = {name = "regex", versions = ['1.3.2']}
syn = {name = "syn", versions = ['1.0.54']}
unicode-xid = {name = "unicode-xid", versions = ['0.2.1']}
# some more of dtolnays crates
anyhow = {name = "anyhow", versions = ['1.0.38']}
async-trait = {name = "async-trait", versions = ['0.1.42']}
cxx = {name = "cxx", versions = ['1.0.32']}
ryu = {name = "ryu", versions = ['1.0.5']}
serde_yaml = {name = "serde_yaml", versions = ['0.8.17']}
thiserror = {name = "thiserror", versions = ['1.0.24']}
# some embark crates, there are other interesting crates but
# unfortunately adding them increases lintcheck runtime drastically
cfg-expr = {name = "cfg-expr", versions = ['0.7.1']}
puffin = {name = "puffin", git_url = "https://github.com/EmbarkStudios/puffin", git_hash = "02dd4a3"}
rpmalloc = {name = "rpmalloc", versions = ['0.2.0']}
tame-oidc = {name = "tame-oidc", versions = ['0.1.0']}
[recursive]
ignore = [

View file

@ -7,6 +7,7 @@
#![allow(clippy::no_effect)]
#![allow(clippy::unnecessary_operation)]
#![allow(clippy::never_loop)]
#![allow(clippy::needless_if)]
#![warn(clippy::excessive_nesting)]
#![allow(clippy::collapsible_if)]

View file

@ -1,5 +1,5 @@
error: this block is too nested
--> $DIR/excessive_nesting.rs:20:25
--> $DIR/excessive_nesting.rs:21:25
|
LL | let w = { 3 };
| ^^^^^
@ -8,7 +8,7 @@ LL | let w = { 3 };
= note: `-D clippy::excessive-nesting` implied by `-D warnings`
error: this block is too nested
--> $DIR/excessive_nesting.rs:66:17
--> $DIR/excessive_nesting.rs:67:17
|
LL | / impl C {
LL | | pub fn c() {}
@ -18,7 +18,7 @@ LL | | }
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:80:25
--> $DIR/excessive_nesting.rs:81:25
|
LL | let x = { 1 }; // not a warning, but cc is
| ^^^^^
@ -26,7 +26,7 @@ LL | let x = { 1 }; // not a warning, but cc is
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:97:17
--> $DIR/excessive_nesting.rs:98:17
|
LL | / pub mod e {
LL | | pub mod f {}
@ -36,7 +36,7 @@ LL | | } // not here
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:110:18
--> $DIR/excessive_nesting.rs:111:18
|
LL | a_but_not({{{{{{{{0}}}}}}}});
| ^^^^^^^^^^^
@ -44,7 +44,7 @@ LL | a_but_not({{{{{{{{0}}}}}}}});
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:111:12
--> $DIR/excessive_nesting.rs:112:12
|
LL | a.a({{{{{{{{{0}}}}}}}}});
| ^^^^^^^^^^^^^
@ -52,7 +52,7 @@ LL | a.a({{{{{{{{{0}}}}}}}}});
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:112:12
--> $DIR/excessive_nesting.rs:113:12
|
LL | (0, {{{{{{{1}}}}}}});
| ^^^^^^^^^
@ -60,7 +60,7 @@ LL | (0, {{{{{{{1}}}}}}});
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:117:25
--> $DIR/excessive_nesting.rs:118:25
|
LL | if true {
| _________________________^
@ -73,7 +73,7 @@ LL | | }
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:129:29
--> $DIR/excessive_nesting.rs:130:29
|
LL | let z = (|| {
| _____________________________^
@ -85,7 +85,7 @@ LL | | })();
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:148:13
--> $DIR/excessive_nesting.rs:149:13
|
LL | y += {{{{{5}}}}};
| ^^^^^
@ -93,7 +93,7 @@ LL | y += {{{{{5}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:149:20
--> $DIR/excessive_nesting.rs:150:20
|
LL | let z = y + {{{{{{{{{5}}}}}}}}};
| ^^^^^^^^^^^^^
@ -101,7 +101,7 @@ LL | let z = y + {{{{{{{{{5}}}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:150:12
--> $DIR/excessive_nesting.rs:151:12
|
LL | [0, {{{{{{{{{{0}}}}}}}}}}];
| ^^^^^^^^^^^^^^^
@ -109,7 +109,7 @@ LL | [0, {{{{{{{{{{0}}}}}}}}}}];
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:151:25
--> $DIR/excessive_nesting.rs:152:25
|
LL | let mut xx = [0; {{{{{{{{100}}}}}}}}];
| ^^^^^^^^^^^^^
@ -117,7 +117,7 @@ LL | let mut xx = [0; {{{{{{{{100}}}}}}}}];
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:152:11
--> $DIR/excessive_nesting.rs:153:11
|
LL | xx[{{{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}}}];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -125,7 +125,7 @@ LL | xx[{{{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}}}];
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:153:13
--> $DIR/excessive_nesting.rs:154:13
|
LL | &mut {{{{{{{{{{y}}}}}}}}}};
| ^^^^^^^^^^^^^^^
@ -133,7 +133,7 @@ LL | &mut {{{{{{{{{{y}}}}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:155:17
--> $DIR/excessive_nesting.rs:156:17
|
LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
| ^^^^
@ -141,7 +141,7 @@ LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:155:28
--> $DIR/excessive_nesting.rs:156:28
|
LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
| ^^^^^^^^^^
@ -149,7 +149,7 @@ LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:157:28
--> $DIR/excessive_nesting.rs:158:28
|
LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
| ^^^^^^^^^^^^^
@ -157,7 +157,7 @@ LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:157:48
--> $DIR/excessive_nesting.rs:158:48
|
LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
| ^^^^^^^^
@ -165,7 +165,7 @@ LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:159:14
--> $DIR/excessive_nesting.rs:160:14
|
LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
| ^^^^^^^^^^^^^^
@ -173,7 +173,7 @@ LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:159:35
--> $DIR/excessive_nesting.rs:160:35
|
LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
| ^^^^^^^^^^^^
@ -181,7 +181,7 @@ LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:161:23
--> $DIR/excessive_nesting.rs:162:23
|
LL | let d = D { d: {{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}} };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -189,7 +189,7 @@ LL | let d = D { d: {{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}} };
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:163:8
--> $DIR/excessive_nesting.rs:164:8
|
LL | {{{{1;}}}}..{{{{{{3}}}}}};
| ^^^^
@ -197,7 +197,7 @@ LL | {{{{1;}}}}..{{{{{{3}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:163:20
--> $DIR/excessive_nesting.rs:164:20
|
LL | {{{{1;}}}}..{{{{{{3}}}}}};
| ^^^^^^^
@ -205,7 +205,7 @@ LL | {{{{1;}}}}..{{{{{{3}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:164:8
--> $DIR/excessive_nesting.rs:165:8
|
LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
| ^^^^
@ -213,7 +213,7 @@ LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:164:21
--> $DIR/excessive_nesting.rs:165:21
|
LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -221,7 +221,7 @@ LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:165:10
--> $DIR/excessive_nesting.rs:166:10
|
LL | ..{{{{{{{5}}}}}}};
| ^^^^^^^^^
@ -229,7 +229,7 @@ LL | ..{{{{{{{5}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:166:11
--> $DIR/excessive_nesting.rs:167:11
|
LL | ..={{{{{3}}}}};
| ^^^^^
@ -237,7 +237,7 @@ LL | ..={{{{{3}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:167:8
--> $DIR/excessive_nesting.rs:168:8
|
LL | {{{{{1;}}}}}..;
| ^^^^^^
@ -245,7 +245,7 @@ LL | {{{{{1;}}}}}..;
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:169:20
--> $DIR/excessive_nesting.rs:170:20
|
LL | loop { break {{{{1}}}} };
| ^^^^^
@ -253,7 +253,7 @@ LL | loop { break {{{{1}}}} };
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:170:13
--> $DIR/excessive_nesting.rs:171:13
|
LL | loop {{{{{{}}}}}}
| ^^^^^^
@ -261,7 +261,7 @@ LL | loop {{{{{{}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:172:14
--> $DIR/excessive_nesting.rs:173:14
|
LL | match {{{{{{true}}}}}} {
| ^^^^^^^^^^
@ -269,7 +269,7 @@ LL | match {{{{{{true}}}}}} {
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:173:20
--> $DIR/excessive_nesting.rs:174:20
|
LL | true => {{{{}}}},
| ^^
@ -277,7 +277,7 @@ LL | true => {{{{}}}},
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:174:21
--> $DIR/excessive_nesting.rs:175:21
|
LL | false => {{{{}}}},
| ^^
@ -285,7 +285,7 @@ LL | false => {{{{}}}},
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:180:17
--> $DIR/excessive_nesting.rs:181:17
|
LL | / {
LL | | println!("warning! :)");
@ -295,7 +295,7 @@ LL | | }
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:189:28
--> $DIR/excessive_nesting.rs:190:28
|
LL | async fn c() -> u32 {{{{{{{0}}}}}}}
| ^^^^^^^^^
@ -303,7 +303,7 @@ LL | async fn c() -> u32 {{{{{{{0}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting.rs:195:8
--> $DIR/excessive_nesting.rs:196:8
|
LL | {{{{b().await}}}};
| ^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:8:39
--> $DIR/needless_collect_indirect.rs:9:39
|
LL | let indirect_iter = sample.iter().collect::<Vec<_>>();
| ^^^^^^^
@ -14,7 +14,7 @@ LL ~ sample.iter().map(|x| (x, x + 1)).collect::<HashMap<_, _>>();
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:10:38
--> $DIR/needless_collect_indirect.rs:11:38
|
LL | let indirect_len = sample.iter().collect::<VecDeque<_>>();
| ^^^^^^^
@ -28,7 +28,7 @@ LL ~ sample.iter().count();
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:12:40
--> $DIR/needless_collect_indirect.rs:13:40
|
LL | let indirect_empty = sample.iter().collect::<VecDeque<_>>();
| ^^^^^^^
@ -42,7 +42,7 @@ LL ~ sample.iter().next().is_none();
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:14:43
--> $DIR/needless_collect_indirect.rs:15:43
|
LL | let indirect_contains = sample.iter().collect::<VecDeque<_>>();
| ^^^^^^^
@ -56,7 +56,7 @@ LL ~ sample.iter().any(|x| x == &5);
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:26:48
--> $DIR/needless_collect_indirect.rs:27:48
|
LL | let non_copy_contains = sample.into_iter().collect::<Vec<_>>();
| ^^^^^^^
@ -70,7 +70,7 @@ LL ~ sample.into_iter().any(|x| x == a);
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:55:51
--> $DIR/needless_collect_indirect.rs:56:51
|
LL | let buffer: Vec<&str> = string.split('/').collect();
| ^^^^^^^
@ -84,7 +84,7 @@ LL ~ string.split('/').count()
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:60:55
--> $DIR/needless_collect_indirect.rs:61:55
|
LL | let indirect_len: VecDeque<_> = sample.iter().collect();
| ^^^^^^^
@ -98,7 +98,7 @@ LL ~ sample.iter().count()
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:65:57
--> $DIR/needless_collect_indirect.rs:66:57
|
LL | let indirect_len: LinkedList<_> = sample.iter().collect();
| ^^^^^^^
@ -112,7 +112,7 @@ LL ~ sample.iter().count()
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:70:57
--> $DIR/needless_collect_indirect.rs:71:57
|
LL | let indirect_len: BinaryHeap<_> = sample.iter().collect();
| ^^^^^^^
@ -126,7 +126,7 @@ LL ~ sample.iter().count()
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:130:59
--> $DIR/needless_collect_indirect.rs:131:59
|
LL | let y: Vec<usize> = vec.iter().map(|k| k * k).collect();
| ^^^^^^^
@ -143,7 +143,7 @@ LL ~ vec.iter().map(|k| k * k).any(|x| x == i);
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:155:59
--> $DIR/needless_collect_indirect.rs:156:59
|
LL | let y: Vec<usize> = vec.iter().map(|k| k * k).collect();
| ^^^^^^^
@ -160,7 +160,7 @@ LL ~ vec.iter().map(|k| k * k).any(|x| x == n);
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:184:63
--> $DIR/needless_collect_indirect.rs:185:63
|
LL | let y: Vec<usize> = vec.iter().map(|k| k * k).collect();
| ^^^^^^^
@ -177,7 +177,7 @@ LL ~ vec.iter().map(|k| k * k).any(|x| x == n);
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:220:59
--> $DIR/needless_collect_indirect.rs:221:59
|
LL | let y: Vec<usize> = vec.iter().map(|k| k * k).collect();
| ^^^^^^^
@ -195,7 +195,7 @@ LL ~ vec.iter().map(|k| k * k).any(|x| x == n);
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:245:26
--> $DIR/needless_collect_indirect.rs:246:26
|
LL | let w = v.iter().collect::<Vec<_>>();
| ^^^^^^^
@ -211,7 +211,7 @@ LL ~ for _ in 0..v.iter().count() {
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:267:30
--> $DIR/needless_collect_indirect.rs:268:30
|
LL | let mut w = v.iter().collect::<Vec<_>>();
| ^^^^^^^
@ -227,7 +227,7 @@ LL ~ while 1 == v.iter().count() {
|
error: avoid using `collect()` when not needed
--> $DIR/needless_collect_indirect.rs:289:30
--> $DIR/needless_collect_indirect.rs:290:30
|
LL | let mut w = v.iter().collect::<Vec<_>>();
| ^^^^^^^