Skip to content

Commit 7dc33f1

Browse files
committed
More clippy coverage recommendations
We missed --all and --all-features in the prior patch.
1 parent 4cbc785 commit 7dc33f1

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
1. Fork it!
44
2. Create your feature branch: `git checkout -b my-new-feature`
55
3. Test it: `cargo test`
6-
4. Lint it: `cargo +nightly clippy --all-targets -- -D warnings`
6+
4. Lint it: `cargo +nightly clippy --all --all-targets -- -D warnings`
77
5. Commit your changes: `git commit -am 'Add some feature'`
88
6. Push to the branch: `git push origin my-new-feature`
99
7. Submit a pull request :D
@@ -69,9 +69,12 @@ clippy is a moving target that can make it hard to merge for little benefit.
6969

7070
We do ask that contributors keep the clippy status clean themselves.
7171

72-
Minimally, run `cargo +nightly clippy --all-targets -- -D warnings` before
72+
Minimally, run `cargo +nightly clippy --all --all-targets -- -D warnings` before
7373
submitting code.
7474

75+
If possible, adding `--all-features` to the command is useful, but will require
76+
additional dependencies like `libcurl-dev`.
77+
7578
Regular contributors or contributors to particularly OS-specific code should
7679
also make sure that their clippy checking is done on at least Linux and Windows,
7780
as OS-conditional code is a common source of unused imports and other small

download/tests/download-curl-resume.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn callback_gets_all_data_as_if_the_download_happened_all_at_once() {
5858
}
5959
Event::DownloadDataReceived(data) => {
6060
for b in data.iter() {
61-
received_in_callback.lock().unwrap().push(b.clone());
61+
received_in_callback.lock().unwrap().push(*b);
6262
}
6363
}
6464
}

download/tests/download-reqwest-resume.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn callback_gets_all_data_as_if_the_download_happened_all_at_once() {
5858
}
5959
Event::DownloadDataReceived(data) => {
6060
for b in data.iter() {
61-
received_in_callback.lock().unwrap().push(b.clone());
61+
received_in_callback.lock().unwrap().push(*b);
6262
}
6363
}
6464
}

tests/cli-paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export PATH="$HOME/apple/bin"
9999
expect_ok(config, &INIT_NONE);
100100

101101
for (before, after) in rcs_before.zip(rcs.iter().map(|rc| rc.exists())) {
102-
assert!(before == false);
102+
assert!(!before);
103103
assert_eq!(before, after);
104104
}
105105
});

0 commit comments

Comments
 (0)