How do i split my rust code into a number of files?


#1

If I have a file one.rs and two.rs ,how do I import functions in two.rs into one.rs ?

Thank you !


#2

You may want to read the Modules chapter in the Rust book: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html