-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a7e5a6
commit f94f9c9
Showing
14 changed files
with
952 additions
and
581 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
use am4::airport::Airports; | ||
// use am4::airport::Airports; | ||
use am4::aircraft::Aircrafts; | ||
// use std::rc::Rc; | ||
// use std::time::Instant; | ||
|
||
fn main() { | ||
// NOTE: directory is CWD, not the location of the executable. | ||
let airports = Airports::from_csv("am4/data/airports.csv").unwrap(); | ||
// let airports = Airports::from_csv("am4/data/airports.csv").unwrap(); | ||
// println!("{:#?}", airports); | ||
|
||
// let a1 = airports.search("vhhh"); | ||
// let a2 = airports.search("iata:hkg"); | ||
// println!("{:?}", Rc::ptr_eq(a1.unwrap(), a2.unwrap())); | ||
// println!("{:#?} {:#?}", y, y2); | ||
|
||
// println!("{:#?}", y); | ||
// println!("{:#?}", y2); | ||
// print their address let y: Result<Option<&Rc<Airport>>, Error> | ||
// let x = airports.suggest("vhhh"); | ||
// println!("{:?}", x); | ||
|
||
let x = airports.suggest("vhhh"); | ||
println!("{:?}", x); | ||
let aircrafts = Aircrafts::from_csv("am4/data/aircrafts.csv").unwrap(); | ||
// println!("{:#?}", aircrafts); | ||
println!("{:#?}", aircrafts.search("a388").unwrap()); | ||
println!("{:#?}", aircrafts.search("a388[sfc]").unwrap()); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.