Skip to content

Commit

Permalink
Put airports behind a feature flag
Browse files Browse the repository at this point in the history
That flag, "airports", is part of the default feature set.
  • Loading branch information
Celeo committed Mar 2, 2024
1 parent 1b7d987 commit 8453c55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vatsim_utils"
version = "0.4.0"
version = "0.5.0"
edition = "2021"
authors = ["Celeo <mattboulanger@fastmail.com>"]
description = "Utilities to interact with VATSIM data"
Expand All @@ -23,3 +23,8 @@ reqwest = { version = "0.11.11", features = ["json"] }
serde = { version = "1.0.142", features = ["derive"] }
serde_json = "1.0.83"
thiserror = "1.0.32"


[features]
default = ["airports"]
airports = []
1 change: 0 additions & 1 deletion src/distance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ pub static AIRPORTS_MAP: Lazy<HashMap<&'static str, Airport>> = Lazy::new(|| {
///
/// assert_eq!(distance.round() as i64, 95);
/// ```
#[must_use]
pub fn haversine(lat1: f64, lon1: f64, lat2: f64, lon2: f64) -> f64 {
let r = 6371e3;
let φ1 = (lat1 * PI) / 180_f64;
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
unused_results
)]

#[cfg(feature = "airports")]
pub mod distance;
pub mod errors;
pub mod live_api;
Expand Down

0 comments on commit 8453c55

Please sign in to comment.