diff options
Diffstat (limited to 'crates/shirabe/src/util/filesystem.rs')
| -rw-r--r-- | crates/shirabe/src/util/filesystem.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/shirabe/src/util/filesystem.rs b/crates/shirabe/src/util/filesystem.rs index 6302a6d2..2ef51ba1 100644 --- a/crates/shirabe/src/util/filesystem.rs +++ b/crates/shirabe/src/util/filesystem.rs @@ -739,10 +739,7 @@ impl Filesystem { php_regex!("{^( [0-9a-z]{2,}+: (?: // (?: [a-z]: )? )? | [a-z]: )}ix"), &path, ) { - prefix = prefix_match - .get(&shirabe_pcre::CaptureKey::ByIndex(1)) - .unwrap_or_default() - .to_string(); + prefix = prefix_match.get(1).unwrap_or_default().to_string(); path = substr(&path, strlen(&prefix), None); } @@ -766,10 +763,7 @@ impl Filesystem { prefix = Preg::replace_callback( php_regex!("{(^|://)[a-z]:$}i"), |m: &shirabe_pcre::PregMatches| -> String { - let s = m - .get(&shirabe_pcre::CaptureKey::ByIndex(0)) - .unwrap_or_default() - .to_string(); + let s = m.get(0).unwrap_or_default().to_string(); strtoupper(&s) }, &prefix, |
