Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.27 KB | None | 0 0
  1. //main.rs
  2.  
  3. mod two;
  4. mod one;
  5.  
  6. use one::test;
  7.  
  8.  
  9. fn main() {
  10.     test();
  11. }
  12.  
  13.  
  14.  
  15. //one.rs
  16.  
  17. use self::two::testtwo;
  18.  
  19. pub fn test() {
  20.     println!("test from one.rs!");
  21.     testtwo();
  22. }
  23.  
  24.  
  25. //two.rs
  26.  
  27. pub fn testtwo() {
  28.     println!("testtwo from two.rs!");
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement