use debug_struct instead of write!
This commit is contained in:
parent
7eb371729b
commit
8efda5e688
1 changed files with 3 additions and 6 deletions
|
|
@ -279,12 +279,9 @@ impl<T> Task<T> {
|
|||
|
||||
impl<T> std::fmt::Debug for Task<T> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"Task<{}>, units={}",
|
||||
std::any::type_name::<T>(),
|
||||
self.units
|
||||
)
|
||||
f.debug_struct(&format!("Task<{}>", std::any::type_name::<T>()))
|
||||
.field("units", &self.units)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue