Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mod english {
- pub mod greeting {
- pub fn hello(name: &str) {
- println!("Hello, {}", name);
- }
- }
- pub mod farewell {
- pub fn goodbye(name: &str) {
- println!("Goodbye, {}", name);
- }
- }
- }
- fn main() {
- use english;
- english::greeting::hello("Michael");
- english::farewell::goodbye("Michael");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement