Skip to content

Commit

Permalink
Merge pull request #1 from tokio-rs/eliza/humancalico/option
Browse files Browse the repository at this point in the history
fix lifetime mismatch
  • Loading branch information
akshatagarwl authored Aug 5, 2020
2 parents 4996eb3 + afe04fd commit eefcfc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tracing-core/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ pub trait Visit {
fn record_debug(&mut self, field: &Field, value: &dyn fmt::Debug);

/// Visit an Option
fn record_option(&mut self, field: &Field, value: Option<&'static (dyn Value + 'static)>) {
fn record_option(&mut self, field: &Field, value: Option<&(dyn Value + 'static)>) {
if let Some(inner_value) = value {
self.record_debug(field, &value)
self.record_debug(field, &inner_value)
} else {
}
}
Expand Down Expand Up @@ -451,7 +451,7 @@ impl<'a> Value for fmt::Arguments<'a> {

impl<T> Value for Option<T>
where
T: Value,
T: Value + 'static,
{
fn record(&self, key: &Field, visitor: &mut dyn Visit) {
visitor.record_option(key, self.as_ref().map(|v| v as &dyn Value))
Expand Down

0 comments on commit eefcfc0

Please sign in to comment.