Skip to content

Instantly share code, notes, and snippets.

@mitsuhiko
Created June 12, 2018 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitsuhiko/be2869892fc7d7047abc3e5d0651e4f9 to your computer and use it in GitHub Desktop.
Save mitsuhiko/be2869892fc7d7047abc3e5d0651e4f9 to your computer and use it in GitHub Desktop.
pub fn add_scope_processor<F>(&mut self, f: Box<F>)
where
F: Fn(&mut Event) + Sync + Send + ?Sized,
Box<F>: im::shared::Shared<Box<Fn(&mut Event) + Sync + Send>>,
{
self.scope_processors = self.scope_processors.push_back(f);
}
@hadronized
Copy link

    pub fn add_scope_processor<F>(&mut self, f: F)
    where
        F: Fn(&mut Event) + Sync + Send + ?Sized,
    {
        self.scope_processors = self.scope_processors.push_back(box f);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment