mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-16 08:46:48 +00:00
Remove dead code in pipe.rs
This commit is contained in:
parent
31d99c66c2
commit
d24c7f8b9c
@ -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,
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user