diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:36 +0000 |
commit | 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch) | |
tree | 3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /vendor/regex/src/input.rs | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-upstream/1.65.0+dfsg1.tar.xz rustc-upstream/1.65.0+dfsg1.zip |
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/regex/src/input.rs')
-rw-r--r-- | vendor/regex/src/input.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/regex/src/input.rs b/vendor/regex/src/input.rs index 5d50ee340..df6c3e0c9 100644 --- a/vendor/regex/src/input.rs +++ b/vendor/regex/src/input.rs @@ -160,7 +160,7 @@ impl<'t> Input for CharInput<'t> { InputAt { pos: self.len(), c: None.into(), byte: None, len: 0 } } else { let c = decode_utf8(&self[i..]).map(|(c, _)| c).into(); - InputAt { pos: i, c: c, byte: None, len: c.len_utf8() } + InputAt { pos: i, c, byte: None, len: c.len_utf8() } } } @@ -231,7 +231,7 @@ pub struct ByteInput<'t> { impl<'t> ByteInput<'t> { /// Return a new byte-based input reader for the given string. pub fn new(text: &'t [u8], only_utf8: bool) -> ByteInput<'t> { - ByteInput { text: text, only_utf8: only_utf8 } + ByteInput { text, only_utf8 } } } |