You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
325 B
Rust
12 lines
325 B
Rust
2 years ago
|
use std::fmt::{Debug, Formatter};
|
||
|
use crate::MultitraitObject;
|
||
|
|
||
|
impl Debug for MultitraitObject {
|
||
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||
|
if let Some(debug) = self.downcast_trait::<dyn Debug>() {
|
||
|
debug.fmt(f)
|
||
|
} else {
|
||
|
write!(f, "<unavailable>")
|
||
|
}
|
||
|
}
|
||
|
}
|