Skip to content

Commit

Permalink
insert_closure -> insert
Browse files Browse the repository at this point in the history
  • Loading branch information
comnik committed Apr 17, 2019
1 parent 9021274 commit e8567a9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions logging/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ pub struct Registry<Id> {
}

impl<Id: Clone+'static> Registry<Id> {
/// Binds a log name to an action on log event batches. See
/// `insert_closure`.
pub fn insert<T: 'static, F: FnMut(&Duration, &mut Vec<(Duration, Id, T)>)+'static>(
&mut self,
name: &str,
action: F) -> Option<Box<Any>>
{
self.insert_closure(name, action)
}

/// Binds a log name to an action on log event batches.
///
/// This method also returns any pre-installed action, rather than overwriting it
Expand All @@ -36,7 +26,7 @@ impl<Id: Clone+'static> Registry<Id> {
/// seen (likely greater or equal to the timestamp of the last event). The end of a
/// logging stream is indicated only by dropping the associated action, which can be
/// accomplished with `remove` (or a call to insert, though this is not recommended).
pub fn insert_closure<T: 'static, F: FnMut(&Duration, &mut Vec<(Duration, Id, T)>)+'static>(
pub fn insert<T: 'static, F: FnMut(&Duration, &mut Vec<(Duration, Id, T)>)+'static>(
&mut self,
name: &str,
action: F) -> Option<Box<Any>>
Expand Down

0 comments on commit e8567a9

Please sign in to comment.