mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 05:38:46 +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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue