-
-
Notifications
You must be signed in to change notification settings - Fork 289
Use range in debugging span #1123
Copy link
Copy link
Closed
Description
Currently Span implements debug in such a way that start and end are separate fields. But I think this would be a better implementation
impl<'i> fmt::Debug for Span<'i> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Span")
.field("str", &self.as_str())
.field("range", &self.start..self.end)
.finish()
}
}Reactions are currently unavailable