Skip to content

Commit 56d74c6

Browse files
committed
fix input parameter in Chars
1 parent ff668ec commit 56d74c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/str/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl<'a> DoubleEndedIterator for Chars<'a> {
136136
impl<'a> PeekableIterator for Chars<'a> {
137137
fn peek_with<T>(&mut self, func: impl for<'b> FnOnce(Option<&'b Self::Item>) -> T) -> T {
138138
let tmp = self.clone().next();
139-
func(&tmp)
139+
func(tmp.as_ref())
140140
}
141141
}
142142

0 commit comments

Comments
 (0)