Skip to content

Commit 22a1c0f

Browse files
committed
fix example syntax
1 parent 2f1e47b commit 22a1c0f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

library/core/src/iter/traits/peekable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ pub trait PeekableIterator: Iterator {
4646
/// let mut c = s.chars();
4747
///
4848
/// let base = if c.next_if_eq(&'0').is_some() {
49-
/// match c.next_if(|c| "oxb".contains(c)) {
49+
/// match c.next_if(|c| "oxb".contains(*c)) {
5050
/// Some('x') => 16,
5151
/// Some('b') => 2,
5252
/// _ => 8
5353
/// }
5454
/// } else {
5555
/// 10
56-
/// }
56+
/// };
5757
///
5858
/// u32::from_str_radix(c.as_str(), base).unwrap()
5959
/// }

0 commit comments

Comments
 (0)