firmware: rename io::Error::{UnexpectedEof→UnexpectedEnd}.

We don't even have files.
pull/1017/head
whitequark 2018-05-15 08:27:45 +00:00
parent ce0593315b
commit 140ca729aa
4 changed files with 6 additions and 6 deletions

View File

@ -129,7 +129,7 @@ extern fn rpc_send_async(service: u32, tag: CSlice<u8>, data: *const *const ())
};
io::ProtoWrite::write_u32(&mut slice, length as u32)
}).unwrap_or_else(|err| {
assert!(err == io::Error::UnexpectedEof);
assert!(err == io::Error::UnexpectedEnd);
while !rpc_queue::empty() {}
send(&RpcSend {

View File

@ -26,7 +26,7 @@ pub type Result<T, E> = result::Result<T, Error<E>>;
#[derive(Fail, Debug, Clone, PartialEq)]
pub enum Error<T> {
#[fail(display = "unexpected end of stream")]
UnexpectedEof,
UnexpectedEnd,
#[fail(display = "unrecognized input")]
Unrecognized,
#[fail(display = "{}", _0)]
@ -51,7 +51,7 @@ pub trait Read {
while !buf.is_empty() {
let read_bytes = self.read(buf)?;
if read_bytes == 0 {
return Err(Error::UnexpectedEof)
return Err(Error::UnexpectedEnd)
}
buf = &mut { buf }[read_bytes..];
@ -85,7 +85,7 @@ pub trait Write {
while buf.len() > 0 {
let written_bytes = self.write(buf)?;
if written_bytes == 0 {
return Err(Error::UnexpectedEof)
return Err(Error::UnexpectedEnd)
}
buf = &buf[written_bytes..];

View File

@ -165,7 +165,7 @@ pub fn thread(io: Io) {
let mut stream = TcpStream::from_handle(&io, stream);
match worker(&io, &mut stream) {
Ok(()) => (),
Err(io::Error::UnexpectedEof) => (),
Err(io::Error::UnexpectedEnd) => (),
Err(err) => error!("aborted: {}", err)
}
});

View File

@ -674,7 +674,7 @@ pub fn thread(io: Io) {
let mut stream = TcpStream::from_handle(&io, stream);
match host_kernel_worker(&io, &mut stream, &mut *congress) {
Ok(()) => (),
Err(io::Error::UnexpectedEof) => {
Err(io::Error::UnexpectedEnd) => {
info!("connection closed");
}
Err(io::Error::Other(ref err))