diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-11 05:08:27 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-11 05:08:27 +0000 |
commit | 91918a6c3087eebc7f8d3c673560984d8defe3dc (patch) | |
tree | 756648be91bd1ba6c127ff6ed96037387e4d9344 /src/expand.rs | |
parent | e47e2cd7550328fccccb1a12de97d62011f04bd7 (diff) | |
parent | 80a03849c94bb006341cefde27db8f0aacb11aa4 (diff) | |
download | regex-91918a6c3087eebc7f8d3c673560984d8defe3dc.tar.gz |
Snap for 8570526 from 80a03849c94bb006341cefde27db8f0aacb11aa4 to mainline-mediaprovider-releaseaml_mpr_331918000aml_mpr_331812020aml_mpr_331711020aml_mpr_331613010aml_mpr_331512020aml_mpr_331412040aml_mpr_331311080aml_mpr_331112050aml_mpr_331112030aml_mpr_331011070aml_mpr_330911040aml_mpr_330811020android13-mainline-mediaprovider-release
Change-Id: Ic95557ab60f6e4a344ba95593b6f7b2a2697c8b0
Diffstat (limited to 'src/expand.rs')
-rw-r--r-- | src/expand.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/expand.rs b/src/expand.rs index 70dbf91..fd9c2d0 100644 --- a/src/expand.rs +++ b/src/expand.rs @@ -1,12 +1,12 @@ use std::str; -use find_byte::find_byte; +use crate::find_byte::find_byte; -use re_bytes; -use re_unicode; +use crate::re_bytes; +use crate::re_unicode; pub fn expand_str( - caps: &re_unicode::Captures, + caps: &re_unicode::Captures<'_>, mut replacement: &str, dst: &mut String, ) { @@ -48,7 +48,7 @@ pub fn expand_str( } pub fn expand_bytes( - caps: &re_bytes::Captures, + caps: &re_bytes::Captures<'_>, mut replacement: &[u8], dst: &mut Vec<u8>, ) { @@ -125,7 +125,7 @@ impl From<usize> for Ref<'static> { /// starting at the beginning of `replacement`. /// /// If no such valid reference could be found, None is returned. -fn find_cap_ref(replacement: &[u8]) -> Option<CaptureRef> { +fn find_cap_ref(replacement: &[u8]) -> Option<CaptureRef<'_>> { let mut i = 0; let rep: &[u8] = replacement.as_ref(); if rep.len() <= 1 || rep[0] != b'$' { @@ -157,7 +157,7 @@ fn find_cap_ref(replacement: &[u8]) -> Option<CaptureRef> { }) } -fn find_cap_ref_braced(rep: &[u8], mut i: usize) -> Option<CaptureRef> { +fn find_cap_ref_braced(rep: &[u8], mut i: usize) -> Option<CaptureRef<'_>> { let start = i; while rep.get(i).map_or(false, |&b| b != b'}') { i += 1; |