Skip to content

Commit

Permalink
[temp] fix
Browse files Browse the repository at this point in the history
  • Loading branch information
belovdv committed Mar 12, 2023
1 parent 23e8b7e commit 3275a9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ impl Client {

pub unsafe fn open(s: &str) -> Result<Client, ErrFromEnv> {
match (Self::from_fifo(s), Self::from_pipe(s)) {
(Some(result), None) | (None, Some(result)) => result,
(Some(Ok(c)), _) | (_, Some(Ok(c))) => Ok(c),
(Some(Err(e)), _) | (_, Some(Err(e))) => Err(e),
(None, None) => Err(ErrFromEnv::ParseEnvVar),
(Some(_), Some(_)) => unreachable!(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl Client {

let sem = OpenSemaphoreA(SYNCHRONIZE | SEMAPHORE_MODIFY_STATE, FALSE, name.as_ptr());
if sem.is_null() {
Err(CannotAcquireSemaphore)
Err(ErrFromEnv::CannotAcquireSemaphore)
} else {
Ok(Client {
sem: Handle(sem),
Expand Down

0 comments on commit 3275a9a

Please sign in to comment.