-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor library layout to simplify import
Changed the path of the library modules so we can `use ieee_registry` instead of `use ieee_registry::ieee`.
- Loading branch information
1 parent
de53c28
commit db7e94e
Showing
13 changed files
with
43 additions
and
52 deletions.
There are no files selected for viewing
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
pub mod ieee; | ||
mod cid; | ||
mod eth; | ||
mod iab; | ||
mod mam; | ||
mod manid; | ||
mod opid; | ||
mod oui; | ||
mod oui36; | ||
mod utils; | ||
|
||
pub fn add(left: usize, right: usize) -> usize { | ||
left + right | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
|
||
#[test] | ||
fn it_works() { | ||
let result = add(2, 2); | ||
assert_eq!(result, 4); | ||
} | ||
} | ||
pub use cid::get_cid_path; | ||
pub use eth::get_eth_path; | ||
pub use iab::get_iab_path; | ||
pub use mam::get_mam_path; | ||
pub use manid::get_manid_path; | ||
pub use opid::get_opid_path; | ||
pub use oui::get_oui_path; | ||
pub use oui36::get_oui36_path; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
/// A CLI interface to the ieee-registry library | ||
/// | ||
/// | ||
use ieee_registry::ieee::*; | ||
use expanduser::expanduser; | ||
|
||
use ieee_registry::*; | ||
|
||
fn main() { | ||
println!("Caching file(s)..."); | ||
println!("\t{:?}", get_cid_path().unwrap()); | ||
println!("\t{:?}", get_eth_path().unwrap()); | ||
println!("\t{:?}", get_iab_path().unwrap()); | ||
println!("\t{:?}", get_mam_path().unwrap()); | ||
println!("\t{:?}", get_manid_path().unwrap()); | ||
println!("\t{:?}", get_opid_path().unwrap()); | ||
println!("\t{:?}", get_oui_path().unwrap()); | ||
println!("\t{:?}", get_oui36_path().unwrap()); | ||
println!("Caching IEEE registry file(s)..."); | ||
println!("✔ {}", expanduser(get_cid_path().unwrap()).unwrap().display()); | ||
println!("✔ {}", expanduser(get_eth_path().unwrap()).unwrap().display()); | ||
println!("✔ {}", expanduser(get_iab_path().unwrap()).unwrap().display()); | ||
println!("✔ {}", expanduser(get_mam_path().unwrap()).unwrap().display()); | ||
println!("✔ {}", expanduser(get_manid_path().unwrap()).unwrap().display()); | ||
println!("✔ {}", expanduser(get_opid_path().unwrap()).unwrap().display()); | ||
println!("✔ {}", expanduser(get_oui_path().unwrap()).unwrap().display()); | ||
println!("✔ {}", expanduser(get_oui36_path().unwrap()).unwrap().display()); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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