Skip to content

Commit

Permalink
Remove steamid-ng feature (keep public API stable) (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicHorrorDev authored Jul 16, 2023
1 parent e3cacde commit 1bfec30
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ categories = ["os", "hardware-support", "filesystem", "accessibility"]
[features]
default = []
shortcuts_extras = ["crc"]
steamid_ng = ["steamid-ng"]

[dependencies]
keyvalues-parser = "0.1"
Expand All @@ -22,8 +21,6 @@ serde = { version = "1.0", features = ["derive"] }

crc = { version = "3.0", optional = true }

steamid-ng = { version = "1", optional = true }

[target.'cfg(target_os="windows")'.dependencies]
winreg = "0.10"
[target.'cfg(not(target_os="windows"))'.dependencies]
Expand Down
7 changes: 0 additions & 7 deletions src/steamapp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,12 @@ pub struct SteamApp {
pub install_scripts: BTreeMap<u64, PathBuf>,
pub shared_depots: BTreeMap<u64, u64>,

#[cfg(not(feature = "steamid_ng"))]
/// The SteamID64 of the last Steam user that played this game on the filesystem.
///
/// This crate supports [steamid-ng](https://docs.rs/steamid-ng) and can automatically convert this to a [SteamID](https://docs.rs/steamid-ng/*/steamid_ng/struct.SteamID.html) for you.
///
/// To enable this support, [use the `steamid_ng` Cargo.toml feature](https://docs.rs/steamlocate/*/steamlocate#using-steamlocate).
pub last_user: Option<u64>,

#[cfg(feature = "steamid_ng")]
/// The [SteamID](https://docs.rs/steamid-ng/*/steamid_ng/struct.SteamID.html) of the last Steam user that played this game on the filesystem.
pub last_user: Option<steamid_ng::SteamID>,
}

impl SteamApp {
Expand Down Expand Up @@ -136,8 +131,6 @@ impl SteamApp {
.join("common")
.join(install_dir);

#[cfg(feature = "steamid_ng")]
let last_user = last_user.map(steamid_ng::SteamID::from);
let universe = universe.map(Universe::from);
let state_flags = state_flags.map(StateFlag::flags_from_packed);
let last_updated = last_updated.and_then(time_as_secs_from_unix_epoch);
Expand Down

0 comments on commit 1bfec30

Please # to comment.