Skip to content

Instantly share code, notes, and snippets.

@kriogenia
Last active June 22, 2022 20:39
Show Gist options
  • Save kriogenia/f9e44936979ac2aaf164582c6222ae61 to your computer and use it in GitHub Desktop.
Save kriogenia/f9e44936979ac2aaf164582c6222ae61 to your computer and use it in GitHub Desktop.
mod mul; // Now it's hidden too
pub use mul::mul; // But we can still access this function
mod strings;
pub fn hello() -> &'static str {
strings::HELLO
}
mod calc;
fn main() {
assert_eq!(4, calc::mul(2, 2)); // used to be calc::mul::mul
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment