unstable-book-gen: fix clippy::single_char_pattern and clippy::iter_skip_next

This commit is contained in:
Matthias Krüger 2020-08-24 00:47:38 +02:00
parent ba6b4274b5
commit a72500145b
2 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ fn check_if_error_code_is_test_in_explanation(f: &str, err_code: &str) -> bool {
if s.starts_with("```") {
if s.contains("compile_fail") && s.contains(err_code) {
return true;
} else if s.contains("(") {
} else if s.contains('(') {
// It's very likely that we can't actually make it fail compilation...
return true;
}

View File

@ -94,9 +94,9 @@ fn copy_recursive(from: &Path, to: &Path) {
}
fn main() {
let library_path_str = env::args_os().skip(1).next().expect("library path required");
let src_path_str = env::args_os().skip(2).next().expect("source path required");
let dest_path_str = env::args_os().skip(3).next().expect("destination path required");
let library_path_str = env::args_os().nth(1).expect("library path required");
let src_path_str = env::args_os().nth(2).expect("source path required");
let dest_path_str = env::args_os().nth(3).expect("destination path required");
let library_path = Path::new(&library_path_str);
let src_path = Path::new(&src_path_str);
let dest_path = Path::new(&dest_path_str);