Skip to content

Commit 41df05d

Browse files
author
Jorge Aparicio
committed
core: use assoc types in Iterator et al
1 parent fc2ba13 commit 41df05d

File tree

7 files changed

+500
-289
lines changed

7 files changed

+500
-289
lines changed

src/libcore/char.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,9 @@ enum EscapeUnicodeState {
446446
Done,
447447
}
448448

449-
impl Iterator<char> for EscapeUnicode {
449+
impl Iterator for EscapeUnicode {
450+
type Item = char;
451+
450452
fn next(&mut self) -> Option<char> {
451453
match self.state {
452454
EscapeUnicodeState::Backslash => {
@@ -501,7 +503,9 @@ enum EscapeDefaultState {
501503
Unicode(EscapeUnicode),
502504
}
503505

504-
impl Iterator<char> for EscapeDefault {
506+
impl Iterator for EscapeDefault {
507+
type Item = char;
508+
505509
fn next(&mut self) -> Option<char> {
506510
match self.state {
507511
EscapeDefaultState::Backslash(c) => {

0 commit comments

Comments
 (0)