NLinker icon

Nice string for T

NLinker | PRO | 07/14/18 07:04:27 PM UTC | 0 ⭐ | 1025 👁️ | Never ⏰ | []
Rust |

220 B

|

None

|

0 👍

/

0 👎

// http://play.rust-lang.org/?gist=ed56c0ea31c17399545386416af5b56c
trait Nice {
    fn nice(&self) -> String;
}
 
impl<T: Debug> Nice for T {
    fn nice(&self) -> String {
        format!("{:?}", *self)
    }
}

Comments