Skip to content

Commit

Permalink
elide lifetime on default handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Easyoakland committed Nov 5, 2024
1 parent d30caae commit ef99a38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esp-wifi/src/wifi/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ pub(crate) mod sealed {
pub type Handler<T> = dyn FnMut(&T) + Sync + Send;

fn default_handler<Event: 'static>() -> Box<Handler<Event>> {
fn nop<'a, T>(_: &'a T) {}
Box::new(nop)
fn drop_ref<T>(_: &T) {}
Box::new(drop_ref)
}

/// Extension trait for setting handlers for an event.
Expand Down

0 comments on commit ef99a38

Please sign in to comment.