Skip to content

Commit

Permalink
add comment to EventSubscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfreed committed Oct 19, 2020
1 parent 7b5502d commit 931887a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cmap/test/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ impl CmapEventHandler for EventHandler {
}

pub struct EventSubscriber<'a> {
/// A reference to the handler this subscriber is receiving events from.
/// Stored here to ensure this subscriber cannot outlive the handler that is generating its
/// events.
_handler: &'a EventHandler,
receiver: tokio::sync::broadcast::Receiver<Event>,
}
Expand Down

0 comments on commit 931887a

Please sign in to comment.