Skip to content

Commit

Permalink
Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Folyd committed Apr 29, 2021
1 parent 31f7697 commit 3f1a4fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tracing-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ impl Parse for Field {
} else {
None
};
Ok(Self { name, kind, value })
Ok(Self { name, value, kind })
}
}

Expand Down
14 changes: 7 additions & 7 deletions tracing-subscriber/src/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ pub(crate) mod tests {
.and_then(NopSubscriber)
.with_collector(StringCollector("collector".into()));
let collector =
Collect::downcast_ref::<StringCollector>(&s).expect("collector should downcast");
<dyn Collect>::downcast_ref::<StringCollector>(&s).expect("collector should downcast");
assert_eq!(&collector.0, "collector");
}

Expand All @@ -1268,14 +1268,14 @@ pub(crate) mod tests {
.and_then(StringSubscriber2("subscriber_2".into()))
.and_then(StringSubscriber3("subscriber_3".into()))
.with_collector(NopCollector);
let subscriber =
Collect::downcast_ref::<StringSubscriber>(&s).expect("subscriber 2 should downcast");
let subscriber = <dyn Collect>::downcast_ref::<StringSubscriber>(&s)
.expect("subscriber 2 should downcast");
assert_eq!(&subscriber.0, "subscriber_1");
let subscriber =
Collect::downcast_ref::<StringSubscriber2>(&s).expect("subscriber 2 should downcast");
let subscriber = <dyn Collect>::downcast_ref::<StringSubscriber2>(&s)
.expect("subscriber 2 should downcast");
assert_eq!(&subscriber.0, "subscriber_2");
let subscriber =
Collect::downcast_ref::<StringSubscriber3>(&s).expect("subscriber 3 should downcast");
let subscriber = <dyn Collect>::downcast_ref::<StringSubscriber3>(&s)
.expect("subscriber 3 should downcast");
assert_eq!(&subscriber.0, "subscriber_3");
}
}

0 comments on commit 3f1a4fb

Please sign in to comment.