Skip to content

Instantly share code, notes, and snippets.

@themasch
Created December 15, 2013 16:57
Show Gist options
  • Save themasch/7975302 to your computer and use it in GitHub Desktop.
Save themasch/7975302 to your computer and use it in GitHub Desktop.
mod AMod {
pub enum FunnyEnum {
FirstVariant,
SecondVariant
}
}
mod AnotherMod {
use AMod::FunnyEnum;
fn test() -> FunnyEnum {
FirstVariant
}
}
fn main() {}
mod AMod {
pub enum FunnyEnum {
FirstVariant,
SecondVariant
}
}
mod AnotherMod {
use AMod::FunnyEnum;
use AMod::FirstVariant;
use AMod::SecondVariant;
fn test() -> FunnyEnum {
FirstVariant
}
}
fn main() {}
@jhermsmeier
Copy link

You can wildcard it, to import everything:

use AMod::*;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment