diff --git a/src/lib.rs b/src/lib.rs index 81ddee3..4eb6cd8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,7 +63,7 @@ #![warn( missing_debug_implementations, missing_docs, - missing_doc_code_examples, + rustdoc::missing_doc_code_examples, rust_2018_idioms, unreachable_pub, bad_style, diff --git a/tests/themes.rs b/tests/themes.rs index f29fa59..379aa25 100644 --- a/tests/themes.rs +++ b/tests/themes.rs @@ -72,7 +72,7 @@ fn test_backwards_compatibility() { let colored_spantrace_control = String::from_utf8(fs::read(control_file_path).unwrap()).unwrap(); - fn get_ansi<'a>(s: &'a str) -> impl Iterator + 'a { + fn get_ansi(s: &str) -> impl Iterator + '_ { s.ansi_parse().filter_map(|x| { if let Output::Escape(ansi) = x { Some(ansi) @@ -80,14 +80,14 @@ fn test_backwards_compatibility() { None } }) - }; + } let colored_spantrace_ansi = get_ansi(&colored_spantrace); let colored_spantrace_control_ansi = get_ansi(&colored_spantrace_control); assert!( colored_spantrace_ansi.eq(colored_spantrace_control_ansi), - format!("\x1b[0mANSI escape sequences are not identical to control!\n\nCONTROL:\n\n{}\n\n\n\n{:?}\n\nCURRENT:\n\n{}\n\n\n\n{:?}\n\n", &colored_spantrace_control, &colored_spantrace_control, &colored_spantrace, &colored_spantrace) + "\x1b[0mANSI escape sequences are not identical to control!\n\nCONTROL:\n\n{}\n\n\n\n{:?}\n\nCURRENT:\n\n{}\n\n\n\n{:?}\n\n", &colored_spantrace_control, &colored_spantrace_control, &colored_spantrace, &colored_spantrace // `\x1b[0m` clears previous ANSI escape sequences ); }