Skip to content

Commit 3275a9a

Browse files
committed
[temp] fix
1 parent 23e8b7e commit 3275a9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/unix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ impl Client {
9090

9191
pub unsafe fn open(s: &str) -> Result<Client, ErrFromEnv> {
9292
match (Self::from_fifo(s), Self::from_pipe(s)) {
93-
(Some(result), None) | (None, Some(result)) => result,
93+
(Some(Ok(c)), _) | (_, Some(Ok(c))) => Ok(c),
94+
(Some(Err(e)), _) | (_, Some(Err(e))) => Err(e),
9495
(None, None) => Err(ErrFromEnv::ParseEnvVar),
95-
(Some(_), Some(_)) => unreachable!(),
9696
}
9797
}
9898

src/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl Client {
141141

142142
let sem = OpenSemaphoreA(SYNCHRONIZE | SEMAPHORE_MODIFY_STATE, FALSE, name.as_ptr());
143143
if sem.is_null() {
144-
Err(CannotAcquireSemaphore)
144+
Err(ErrFromEnv::CannotAcquireSemaphore)
145145
} else {
146146
Ok(Client {
147147
sem: Handle(sem),

0 commit comments

Comments
 (0)