@@ -1569,7 +1569,7 @@ pub enum CharsError {
1569
1569
NotUtf8 ,
1570
1570
1571
1571
/// Variant representing that an I/O error occurred.
1572
- Other ( Error ) ,
1572
+ Io ( Error ) ,
1573
1573
}
1574
1574
1575
1575
#[ unstable( feature = "io" , reason = "awaiting stability of Read::chars" ,
@@ -1587,7 +1587,7 @@ impl<R: Read> Iterator for Chars<R> {
1587
1587
Ok ( 0 ) => $on_eof,
1588
1588
Ok ( ..) => break ,
1589
1589
Err ( ref e) if e. kind( ) == ErrorKind :: Interrupted => { }
1590
- Err ( e) => return Some ( Err ( CharsError :: Other ( e) ) ) ,
1590
+ Err ( e) => return Some ( Err ( CharsError :: Io ( e) ) ) ,
1591
1591
}
1592
1592
}
1593
1593
buf[ 0 ]
@@ -1657,13 +1657,13 @@ impl std_error::Error for CharsError {
1657
1657
fn description ( & self ) -> & str {
1658
1658
match * self {
1659
1659
CharsError :: NotUtf8 => "invalid utf8 encoding" ,
1660
- CharsError :: Other ( ref e) => std_error:: Error :: description ( e) ,
1660
+ CharsError :: Io ( ref e) => std_error:: Error :: description ( e) ,
1661
1661
}
1662
1662
}
1663
1663
fn cause ( & self ) -> Option < & std_error:: Error > {
1664
1664
match * self {
1665
1665
CharsError :: NotUtf8 => None ,
1666
- CharsError :: Other ( ref e) => e. cause ( ) ,
1666
+ CharsError :: Io ( ref e) => e. cause ( ) ,
1667
1667
}
1668
1668
}
1669
1669
}
@@ -1676,7 +1676,7 @@ impl fmt::Display for CharsError {
1676
1676
CharsError :: NotUtf8 => {
1677
1677
"byte stream did not contain valid utf8" . fmt ( f)
1678
1678
}
1679
- CharsError :: Other ( ref e) => e. fmt ( f) ,
1679
+ CharsError :: Io ( ref e) => e. fmt ( f) ,
1680
1680
}
1681
1681
}
1682
1682
}
@@ -1762,7 +1762,7 @@ mod tests {
1762
1762
Cursor :: new ( bytes) . chars ( ) . map ( |result| match result {
1763
1763
Ok ( c) => c,
1764
1764
Err ( CharsError :: NotUtf8 ) => '\u{FFFD}' ,
1765
- Err ( CharsError :: Other ( e) ) => panic ! ( "{}" , e) ,
1765
+ Err ( CharsError :: Io ( e) ) => panic ! ( "{}" , e) ,
1766
1766
} ) . collect ( )
1767
1767
}
1768
1768
0 commit comments