Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
Signed-off-by: Eliza Weisman <[email protected]>
  • Loading branch information
hawkw committed Jul 9, 2019
1 parent ee50db9 commit ccaf143
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions tracing-subscriber/src/filter.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

use crate::layer::{Ctx, Layer};
use tracing_core::{subscriber::{Subscriber, Interest}, Metadata};
use std::marker::PhantomData;
use tracing_core::{
subscriber::{Interest, Subscriber},
Metadata,
};

pub trait Filter<S>
where
Expand Down Expand Up @@ -54,7 +56,7 @@ where
#[derive(Clone, Debug)]
pub struct FilterLayer<F, S> {
filter: F,
_s: PhantomData<fn(S)>
_s: PhantomData<fn(S)>,
}

#[derive(Clone, Debug)]
Expand Down Expand Up @@ -143,10 +145,7 @@ where
F: Fn(&Metadata) -> bool + 'static,
{
fn from(f: F) -> Self {
Self {
f,
_s: PhantomData,
}
Self { f, _s: PhantomData }
}
}

Expand All @@ -172,10 +171,7 @@ where
F: Fn(&'static Metadata<'static>) -> Interest + 'static,
{
fn from(f: F) -> Self {
Self {
f,
_s: PhantomData,
}
Self { f, _s: PhantomData }
}
}

Expand All @@ -185,13 +181,15 @@ impl<F, S> crate::sealed::Sealed<S> for F
where
F: Filter<S>,
S: Subscriber,
{}
{
}

impl<F, S> FilterExt<S> for F
where
F: Filter<S>,
S: Subscriber,
{}
{
}

// === impl And ===

Expand Down

0 comments on commit ccaf143

Please sign in to comment.