Skip to content

Commit

Permalink
Fix clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
MolotovCherry committed Sep 2, 2024
1 parent 5c3ca8e commit c3a961c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pueue/src/daemon/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ fn run_as<T>(session_id: u32, cb: impl FnOnce(OwnedHandle) -> Result<T>) -> Resu
Ok(t)
}

#[derive(Default)]
struct OwnedHandle(HANDLE);

unsafe impl Send for OwnedHandle {}
Expand All @@ -308,12 +309,6 @@ impl OwnedHandle {
}
}

impl Default for OwnedHandle {
fn default() -> Self {
Self(HANDLE::default())
}
}

impl From<HANDLE> for OwnedHandle {
fn from(value: HANDLE) -> Self {
Self(value)
Expand Down Expand Up @@ -447,7 +442,7 @@ impl Spawner {
}

fn start(&self, session: Option<u32>) -> Result<()> {
let Some(session) = session.or_else(|| get_current_session()) else {
let Some(session) = session.or_else(get_current_session) else {
bail!("get_current_session failed");
};

Expand Down

0 comments on commit c3a961c

Please sign in to comment.