Skip to content

Commit fd31eb6

Browse files
committed
Rename CharsError::Other to CharsError::Io
1 parent 7ab3450 commit fd31eb6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libstd/io/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,7 @@ pub enum CharsError {
15691569
NotUtf8,
15701570

15711571
/// Variant representing that an I/O error occurred.
1572-
Other(Error),
1572+
Io(Error),
15731573
}
15741574

15751575
#[unstable(feature = "io", reason = "awaiting stability of Read::chars",
@@ -1587,7 +1587,7 @@ impl<R: Read> Iterator for Chars<R> {
15871587
Ok(0) => $on_eof,
15881588
Ok(..) => break,
15891589
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))),
15911591
}
15921592
}
15931593
buf[0]
@@ -1657,13 +1657,13 @@ impl std_error::Error for CharsError {
16571657
fn description(&self) -> &str {
16581658
match *self {
16591659
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),
16611661
}
16621662
}
16631663
fn cause(&self) -> Option<&std_error::Error> {
16641664
match *self {
16651665
CharsError::NotUtf8 => None,
1666-
CharsError::Other(ref e) => e.cause(),
1666+
CharsError::Io(ref e) => e.cause(),
16671667
}
16681668
}
16691669
}
@@ -1676,7 +1676,7 @@ impl fmt::Display for CharsError {
16761676
CharsError::NotUtf8 => {
16771677
"byte stream did not contain valid utf8".fmt(f)
16781678
}
1679-
CharsError::Other(ref e) => e.fmt(f),
1679+
CharsError::Io(ref e) => e.fmt(f),
16801680
}
16811681
}
16821682
}
@@ -1762,7 +1762,7 @@ mod tests {
17621762
Cursor::new(bytes).chars().map(|result| match result {
17631763
Ok(c) => c,
17641764
Err(CharsError::NotUtf8) => '\u{FFFD}',
1765-
Err(CharsError::Other(e)) => panic!("{}", e),
1765+
Err(CharsError::Io(e)) => panic!("{}", e),
17661766
}).collect()
17671767
}
17681768

0 commit comments

Comments
 (0)