Cleanup
This commit is contained in:
1 parent
fce589369b
commit
ed83ffc5f3
4 files changed
+215
-284
No files matched your search
@@ -1,8 +1,6 @@
|
||||
use enumscribe::*;
|
||||
|
||||
// #[derive(ScribeString)]
|
||||
|
||||
#[derive(TryScribeStaticStr)]
|
||||
#[derive(TryScribeCowStr)]
|
||||
enum Airport {
|
||||
#[enumscribe(str = "LHR", case_insensitive)]
|
||||
Heathrow,
|
||||
@@ -12,14 +10,14 @@ enum Airport {
|
||||
Luton,
|
||||
#[enumscribe(str = "BHX", case_insensitive, ignore)]
|
||||
BirminghamInternational,
|
||||
// #[enumscribe(other)]
|
||||
// Other(String),
|
||||
#[enumscribe(other)]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let luton = Airport::Luton;
|
||||
println!("Hello, {:?}!", luton.try_scribe());
|
||||
|
||||
// let other = Airport::Other("Dedicated EasyJet-only airport".to_owned());
|
||||
// println!("Hello, {:?}!", other.try_scribe());
|
||||
let other = Airport::Other("Dedicated EasyJet-only airport".to_owned());
|
||||
println!("Hello, {:?}!", other.try_scribe());
|
||||
}
|
||||
Reference in new issue
Block a user