This commit is contained in:
@@ -24,41 +24,41 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
Some(Notification::AirportList(data)) => {
|
||||
for record in data {
|
||||
// The returned list is quite large, so we look for a particular record
|
||||
if record.icao == "EGSC" {
|
||||
println!("{record:?}");
|
||||
// there's no need to unsubscribe
|
||||
// because this is a one-off request, not a subscription
|
||||
}
|
||||
// if record.icao == "EGSC" {
|
||||
// println!("{record:?}");
|
||||
// // there's no need to unsubscribe
|
||||
// // because this is a one-off request, not a subscription
|
||||
// }
|
||||
}
|
||||
}
|
||||
Some(Notification::WaypointList(data)) => {
|
||||
for record in data {
|
||||
// The returned list is quite large, so we look for a particular record
|
||||
if record.icao == "BRAIN" {
|
||||
println!("{record:?}");
|
||||
// we've got the entry we're interesting in - we can unsubscribe now
|
||||
client.unsubscribe_to_facilities(FacilityType::Waypoint)?;
|
||||
}
|
||||
// if record.icao == "BRAIN" {
|
||||
// println!("{record:?}");
|
||||
// // we've got the entry we're interesting in - we can unsubscribe now
|
||||
// client.unsubscribe_to_facilities(FacilityType::Waypoint)?;
|
||||
// }
|
||||
}
|
||||
}
|
||||
Some(Notification::NdbList(data)) => {
|
||||
for record in data {
|
||||
// The returned list is quite large, so we look for a particular record
|
||||
if record.icao == "CAM" {
|
||||
println!("{record:?}");
|
||||
// we've got the entry we're interesting in - we can unsubscribe now
|
||||
client.unsubscribe_to_facilities(FacilityType::NDB)?;
|
||||
}
|
||||
// if record.icao == "CAM" {
|
||||
// println!("{record:?}");
|
||||
// // we've got the entry we're interesting in - we can unsubscribe now
|
||||
// client.unsubscribe_to_facilities(FacilityType::NDB)?;
|
||||
// }
|
||||
}
|
||||
}
|
||||
Some(Notification::VorList(data)) => {
|
||||
for record in data {
|
||||
// The returned list is quite large, so we look for a particular record
|
||||
if record.icao == "LON" {
|
||||
println!("{record:?}");
|
||||
// we've got the entry we're interesting in - we can unsubscribe now
|
||||
client.unsubscribe_to_facilities(FacilityType::VOR)?;
|
||||
}
|
||||
// if record.icao == "LON" {
|
||||
// println!("{record:?}");
|
||||
// // we've got the entry we're interesting in - we can unsubscribe now
|
||||
// client.unsubscribe_to_facilities(FacilityType::VOR)?;
|
||||
// }
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
|
Reference in New Issue
Block a user