Skip to content

Commit

Permalink
Merge pull request #921 from bgurney-rh/rust-1.79
Browse files Browse the repository at this point in the history
Fix unwrap-or-default lint
  • Loading branch information
mulkieran authored Jun 13, 2024
2 parents a8a6df0 + c6a9dbb commit 845fa0b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/core/dm_udev_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@ pub mod sync_semaphore {
semun: Option<semun>,
) -> Result<i32, std::io::Error> {
semctl_cmd_allowed(cmd)?;
let semun = match semun {
Some(semun) => semun,
None => Default::default(),
};
let semun = semun.unwrap_or_default();
let r = unsafe { libc_semctl(semid as c_int, semnum as c_int, cmd as c_int, semun) };
match r {
i if i < 0 => Err(io::Error::last_os_error()),
Expand Down

0 comments on commit 845fa0b

Please sign in to comment.