diff options
Diffstat (limited to 'crates/shirabe/tests/all_functional_test.rs')
| -rw-r--r-- | crates/shirabe/tests/all_functional_test.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/tests/all_functional_test.rs b/crates/shirabe/tests/all_functional_test.rs index 8578ed43..ad075ad6 100644 --- a/crates/shirabe/tests/all_functional_test.rs +++ b/crates/shirabe/tests/all_functional_test.rs @@ -144,11 +144,11 @@ fn expect_matches(expected: &str, output: &str) { let Some(m) = Preg::is_match3(php_regex!("{%(.+?)%}"), &expected[i..]) else { panic!("Failed to match %...% in {}", &expected[i..]); }; - let regex = m.get(&CaptureKey::ByIndex(1)).cloned().unwrap(); + let regex = m.get(&CaptureKey::ByIndex(1)).map(str::to_string).unwrap(); let pattern = format!("{{{}}}", regex); if let Some(m) = Preg::is_match3(&pattern, &output[j..]) { - let full = m.get(&CaptureKey::ByIndex(0)).cloned().unwrap(); + let full = m.get(&CaptureKey::ByIndex(0)).map(str::to_string).unwrap(); i += regex.len() + 2; j += full.len(); continue; |
