Skip to content

Commit

Permalink
Fix unused result
Browse files Browse the repository at this point in the history
  • Loading branch information
yaahc committed Jan 28, 2020
1 parent 090a755 commit 493cc30
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tracing-error/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ where
return;
}
let mut fields = String::new();
self.format.format_fields(&mut fields, attrs);
span.extensions_mut()
.insert(FormattedFields::<F>::new(fields));
if self.format.format_fields(&mut fields, attrs).is_ok() {
span.extensions_mut()
.insert(FormattedFields::<F>::new(fields));
}
}

unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()> {
Expand Down

0 comments on commit 493cc30

Please sign in to comment.