aboutsummaryrefslogtreecommitdiff
path: root/src/expand.rs
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:08:27 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:08:27 +0000
commit91918a6c3087eebc7f8d3c673560984d8defe3dc (patch)
tree756648be91bd1ba6c127ff6ed96037387e4d9344 /src/expand.rs
parente47e2cd7550328fccccb1a12de97d62011f04bd7 (diff)
parent80a03849c94bb006341cefde27db8f0aacb11aa4 (diff)
downloadregex-91918a6c3087eebc7f8d3c673560984d8defe3dc.tar.gz
Change-Id: Ic95557ab60f6e4a344ba95593b6f7b2a2697c8b0
Diffstat (limited to 'src/expand.rs')
-rw-r--r--src/expand.rs14
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;