Skip to content

Commit

Permalink
Make sample code complete
Browse files Browse the repository at this point in the history
  • Loading branch information
TonalidadeHidrica committed Feb 17, 2021
1 parent 328f334 commit 00f8cda
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sdl2/event.rs
Expand Up @@ -242,6 +242,8 @@ impl crate::EventSubsystem {
///
/// # Example: dump every event to stderr
/// ```
/// // `let _ = ...` is insufficient, as it is dropped immediately.
/// // You have to name the variable.
/// let _event_watch = event_subsystem.add_event_watch(|event| {
/// dbg!(event);
/// });
Expand Down

0 comments on commit 00f8cda

Please sign in to comment.