Fix lint warnings

This commit is contained in:
Aode (lion) 2021-12-26 11:11:04 -06:00
parent f7e61e648f
commit 1d40228297
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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<Item = AnsiSequence> + 'a {
fn get_ansi(s: &str) -> impl Iterator<Item = AnsiSequence> + '_ {
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
);
}