Skip to content

Commit a725001

Browse files
committed
unstable-book-gen: fix clippy::single_char_pattern and clippy::iter_skip_next
1 parent ba6b427 commit a725001

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/tools/tidy/src/error_codes_check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn check_if_error_code_is_test_in_explanation(f: &str, err_code: &str) -> bool {
5656
if s.starts_with("```") {
5757
if s.contains("compile_fail") && s.contains(err_code) {
5858
return true;
59-
} else if s.contains("(") {
59+
} else if s.contains('(') {
6060
// It's very likely that we can't actually make it fail compilation...
6161
return true;
6262
}

src/tools/unstable-book-gen/src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ fn copy_recursive(from: &Path, to: &Path) {
9494
}
9595

9696
fn main() {
97-
let library_path_str = env::args_os().skip(1).next().expect("library path required");
98-
let src_path_str = env::args_os().skip(2).next().expect("source path required");
99-
let dest_path_str = env::args_os().skip(3).next().expect("destination path required");
97+
let library_path_str = env::args_os().nth(1).expect("library path required");
98+
let src_path_str = env::args_os().nth(2).expect("source path required");
99+
let dest_path_str = env::args_os().nth(3).expect("destination path required");
100100
let library_path = Path::new(&library_path_str);
101101
let src_path = Path::new(&src_path_str);
102102
let dest_path = Path::new(&dest_path_str);

0 commit comments

Comments
 (0)