Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. pub struct Position(usize);
  2.  
  3. fn main() {
  4. println!("Hello, world!");
  5.  
  6. let forty_two = Position(42);
  7.  
  8. //println!("{}", forty_two.0)
  9. other::print(forty_two);
  10. }
  11.  
  12. mod other {
  13. use super::*;
  14.  
  15. pub fn print(foo: Position) {
  16. println!("{}", foo.0)
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement