Remove dead code in pipe.rs

This commit is contained in:
Ruihan Li 2024-07-15 19:36:42 +08:00 committed by Tate, Hongliang Tian
parent 31d99c66c2
commit d24c7f8b9c

View File

@ -1,7 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
#![allow(dead_code)]
use super::{
file_handle::FileLike,
utils::{AccessMode, Consumer, InodeMode, InodeType, Metadata, Producer, StatusFlags},
@ -153,14 +151,3 @@ impl FileLike for PipeWriter {
self.producer.unregister_observer(observer)
}
}
fn should_io_return(res: &Result<usize>, is_nonblocking: bool) -> bool {
if is_nonblocking {
return true;
}
match res {
Ok(_) => true,
Err(e) if e.error() == Errno::EAGAIN => false,
Err(_) => true,
}
}