Skip to content

Commit 6e047a5

Browse files
committed
[temp] remove Option from from_pipe
1 parent 8b50514 commit 6e047a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/unix.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl Client {
8989
}
9090

9191
pub unsafe fn open(s: &str) -> Result<Client, ErrFromEnv> {
92-
Ok(Self::from_fifo(s)?.unwrap_or(Self::from_pipe(s)?.ok_or(ErrFromEnv::ParseEnvVar)?))
92+
Ok(Self::from_fifo(s)?.unwrap_or(Self::from_pipe(s)?))
9393
}
9494

9595
/// `--jobserver-auth=fifo:PATH`
@@ -110,7 +110,7 @@ impl Client {
110110
}
111111

112112
/// `--jobserver-auth=R,W`
113-
unsafe fn from_pipe(s: &str) -> Result<Option<Client>, ErrFromEnv> {
113+
unsafe fn from_pipe(s: &str) -> Result<Client, ErrFromEnv> {
114114
let mut parts = s.splitn(2, ',');
115115
let read = parts.next().unwrap();
116116
let write = parts.next().ok_or(ErrFromEnv::ParseEnvVar)?;
@@ -128,7 +128,7 @@ impl Client {
128128
if check_fd(read) && check_fd(write) {
129129
drop(set_cloexec(read, true));
130130
drop(set_cloexec(write, true));
131-
Ok(Some(Client::from_fds(read, write)))
131+
Ok(Client::from_fds(read, write))
132132
} else {
133133
Err(ErrFromEnv::InvalidDescriptor(read, write))
134134
}

0 commit comments

Comments
 (0)