mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 06:14:55 +00:00
Update crates/expect/src/lib.rs
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
This commit is contained in:
parent
d21dae738b
commit
18e4e9fb0b
@ -78,7 +78,7 @@ impl Expect {
|
||||
line_start += line.len();
|
||||
}
|
||||
let (literal_start, line_indent) = target_line.unwrap();
|
||||
let literal_length = file[literal_start..].find("]]").unwrap();
|
||||
let literal_length = file[literal_start..].find("]]").expect("Couldn't find matching `]]` for `expect![[`.");
|
||||
let literal_range = literal_start..literal_start + literal_length;
|
||||
Location { line_indent, literal_range }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user