Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Foo(i32);
- impl std::fmt::Debug for Foo where i32: std::fmt::Debug {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
- write!(f, "{}", self.0)
- }
- }
- fn main() {
- println!("{:?}", Foo(42));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement