Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove steamid-ng feature (keep public API stable) #33

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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