]> git.lizzy.rs Git - rust.git/blobdiff - src/libregex/re.rs
rollup merge of #19038: jayelm/fixed-typos
[rust.git] / src / libregex / re.rs
index dbdb271874474eeaf59031a74a158fc6effda21b..e70491a785c370b27ecb643153559eb1a3ece86b 100644 (file)
@@ -561,7 +561,7 @@ fn next(&mut self) -> Option<Option<String>> {
 /// Replacer describes types that can be used to replace matches in a string.
 pub trait Replacer {
     /// Returns a possibly owned string that is used to replace the match
-    /// corresponding the the `caps` capture group.
+    /// corresponding to the `caps` capture group.
     ///
     /// The `'a` lifetime refers to the lifetime of a borrowed string when
     /// a new owned string isn't needed (e.g., for `NoExpand`).
@@ -726,7 +726,7 @@ pub fn name(&self, name: &str) -> &'t str {
         match self.named {
             None => "",
             Some(ref h) => {
-                match h.find_equiv(name) {
+                match h.get(name) {
                     None => "",
                     Some(i) => self.at(*i),
                 }