Skip to content

Commit b4d9175

Browse files
authored
doc: invalid code in replace_append docs
`&str` doesn't implement `IntoIterator`, so this should just use `push_str` instead. The invalid code was probably copied from the `bytes` module, where it does work. PR #694
1 parent a7cc8bd commit b4d9175

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/re_unicode.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ pub trait Replacer {
11221122
/// have a match at capture group `0`.
11231123
///
11241124
/// For example, a no-op replacement would be
1125-
/// `dst.extend(caps.get(0).unwrap().as_str())`.
1125+
/// `dst.push_str(caps.get(0).unwrap().as_str())`.
11261126
fn replace_append(&mut self, caps: &Captures, dst: &mut String);
11271127

11281128
/// Return a fixed unchanging replacement string.

0 commit comments

Comments
 (0)