Skip to content

Instantly share code, notes, and snippets.

@nickbrowne
Created January 21, 2019 03:22
Show Gist options
  • Save nickbrowne/712980dda1f2ccffbb340750b4517c53 to your computer and use it in GitHub Desktop.
Save nickbrowne/712980dda1f2ccffbb340750b4517c53 to your computer and use it in GitHub Desktop.
// 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