Skip to content

Commit

Permalink
Organize code
Browse files Browse the repository at this point in the history
  • Loading branch information
temeddix committed Sep 14, 2024
1 parent c4b49d9 commit 94afa5a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rust_crate/src/shutdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ impl Event {

/// Creates a future that will be resolved when the flag is set to `true`.
pub fn wait_async(&self) -> EventFuture {
let inner = match self.inner.lock() {
let guard = match self.inner.lock() {
Ok(inner) => inner,
Err(poisoned) => poisoned.into_inner(),
};
EventFuture {
started_session: inner.session,
started_session: guard.session,
inner: self.inner.clone(),
}
}
Expand Down Expand Up @@ -120,11 +120,10 @@ impl EventBlocking {
Ok(inner) => inner,
Err(poisoned) => poisoned.into_inner(),
};
let start_session = guard.session;
EventBlocking {
inner: inner.clone(),
condvar,
started_session: start_session,
started_session: guard.session,
}
}

Expand Down

0 comments on commit 94afa5a

Please sign in to comment.