Skip to content

Commit

Permalink
Compatibility with rustc 1.75.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Virv12 committed Oct 22, 2024
1 parent 8b8d584 commit c111bf4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/tools/find_bad_case/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit c111bf4

Please sign in to comment.