Created
January 21, 2019 03:22
-
-
Save nickbrowne/712980dda1f2ccffbb340750b4517c53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.rs | |
mod foo; | |
use foo::Bar; | |
fn main() { | |
Bar::do_a_thing(); | |
} | |
// foo/mod.rs | |
mod bar; | |
pub use self::bar::Bar; | |
// foo/bar.rs | |
pub struct Bar { | |
... | |
} | |
impl Bar { | |
pub fn do_a_thing() { | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment