Skip to content

Commit 1c9a655

Browse files
committed
fix expect![[]]
1 parent 0eba05e commit 1c9a655

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ fn locate_end(arg_start_to_eof: &str) -> Option<usize> {
359359
// expect![[]]
360360
'[' => {
361361
let str_start_to_eof = arg_start_to_eof[1..].trim_start();
362-
let str_len = find_str_lit_len(str_start_to_eof)?;
362+
let str_len = find_str_lit_len(str_start_to_eof).unwrap_or(0);
363363
let str_end_to_eof = &str_start_to_eof[str_len..];
364364
let closing_brace_offset = str_end_to_eof.find(']')?;
365365
Some((arg_start_to_eof.len() - str_end_to_eof.len()) + closing_brace_offset + 1)

0 commit comments

Comments
 (0)