Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Rename crate
- extern crate phrases as sayings;
- // Rename module
- use sayings::japanese::greetings as ja_greetings;
- // Glob all functions in a module, NOT a good style
- use sayings::japanese::farewells::*;
- // A complex renaming scheme
- use sayings::english::{self, greetings as en_greetings, farewells as en_farewells};
- fn main() {
- println!("Hello in English; {}", en_greetings::hello());
- println!("And in Japanese: {}", ja_greetings::hello());
- println!("Goodbye in English: {}", english::farewells::goodbye());
- println!("Again: {}", en_farewells::goodbye());
- // Use a globbed function, AVOID it when possible.
- println!("And in Japanese: {}", goodbye());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement