1
0
Fork 0
forked from wry/wry

all: simplify handling of Errno values

This commit is contained in:
Julian Orth 2026-04-02 18:34:12 +02:00
parent 9c605df692
commit 34914eccb0
58 changed files with 443 additions and 464 deletions

View file

@ -1,5 +1,5 @@
use {
crate::utils::oserror::OsError,
crate::utils::oserror::{OsError, OsErrorExt},
uapi::{OwnedFd, c, pipe2},
};
@ -9,7 +9,7 @@ pub struct Pipe<L, R> {
}
pub fn pipe() -> Result<Pipe<OwnedFd, OwnedFd>, OsError> {
let (read, write) = pipe2(c::O_CLOEXEC)?;
let (read, write) = pipe2(c::O_CLOEXEC).to_os_error()?;
Ok(Pipe { read, write })
}