Guest User

Untitled

a guest
Sep 25th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. trait A {
  2. fn to_s(self) -> String;
  3. }
  4.  
  5. impl A for u64 {
  6. fn to_s(self) -> String {
  7. format!("{}", self)
  8. }
  9. }
  10.  
  11. fn main() {
  12. println!("{}", 1.to_s());
  13. }
Add Comment
Please, Sign In to add comment