aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5555e70..f9a5251 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -374,7 +374,7 @@ impl SteamId {
/// Returns the formatted SteamID32 string for this steam id.
pub fn steamid32(&self) -> String {
let account_id = self.account_id().raw();
- let last_bit: u8 = if account_id % 2 == 0 { 0 } else { 1 };
+ let last_bit = account_id & 1;
format!("STEAM_0:{}:{}", last_bit, (account_id >> 1))
}
}