Skip to content

Commit

Permalink
Document to_static
Browse files Browse the repository at this point in the history
  • Loading branch information
Osspial committed Jun 19, 2019
1 parent bb647e8 commit 6b13b8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ impl<'a, T> Event<'a, T> {
}
}

/// If the event doesn't contain a reference, turn it into an event with a `'static` lifetime.
/// Otherwise, return `None`.
pub fn to_static(self) -> Option<Event<'static, T>> {
use self::Event::*;
match self {
Expand Down

0 comments on commit 6b13b8e

Please sign in to comment.