Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct Position(usize);
- fn main() {
- println!("Hello, world!");
- let forty_two = Position(42);
- //println!("{}", forty_two.0)
- other::print(forty_two);
- }
- mod other {
- use super::*;
- pub fn print(foo: Position) {
- println!("{}", foo.0)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement