aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/expect/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/expect/src/lib.rs b/crates/expect/src/lib.rs
index 1a1302cec..92364bfa7 100644
--- a/crates/expect/src/lib.rs
+++ b/crates/expect/src/lib.rs
@@ -78,7 +78,7 @@ impl Expect {
78 line_start += line.len(); 78 line_start += line.len();
79 } 79 }
80 let (literal_start, line_indent) = target_line.unwrap(); 80 let (literal_start, line_indent) = target_line.unwrap();
81 let literal_length = file[literal_start..].find("]]").unwrap(); 81 let literal_length = file[literal_start..].find("]]").expect("Couldn't find matching `]]` for `expect![[`.");
82 let literal_range = literal_start..literal_start + literal_length; 82 let literal_range = literal_start..literal_start + literal_length;
83 Location { line_indent, literal_range } 83 Location { line_indent, literal_range }
84 } 84 }