From c111bf4b61a7d26d222d1cb29545741b9c515621 Mon Sep 17 00:00:00 2001 From: Filippo Casarin Date: Tue, 22 Oct 2024 17:17:21 +0200 Subject: [PATCH] Compatibility with rustc 1.75.0 --- src/tools/find_bad_case/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tools/find_bad_case/mod.rs b/src/tools/find_bad_case/mod.rs index 87720ea9..11785bdb 100644 --- a/src/tools/find_bad_case/mod.rs +++ b/src/tools/find_bad_case/mod.rs @@ -328,10 +328,9 @@ fn print_file( if content.len() > MAX_CONTENT_LEN { let prefix = (0..MAX_CONTENT_LEN) .rev() - .filter_map(|idx| content.split_at_checked(idx)) + .filter_map(|idx| content.get(..idx)) .next() - .unwrap() - .0; + .unwrap(); println!("{}...\n", prefix.trim_end()); } else { println!("{}\n", content.trim_end());