Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix lifetime mismatch #1

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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