diff options
| author | William <[email protected]> | 2021-05-03 14:35:00 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-03 14:35:00 +0100 |
| commit | d132e2bcb4aa48930897026ff3d7506b09a62318 (patch) | |
| tree | 01277a45b57ea7dea4d737b31e74157c62376f6d /src/lib.rs | |
| parent | Add SteamID utils (AccountId::from_raw, AccountId::raw) and SteamId::steamid32 (diff) | |
| download | steamworks-rs-d132e2bcb4aa48930897026ff3d7506b09a62318.tar.xz steamworks-rs-d132e2bcb4aa48930897026ff3d7506b09a62318.zip | |
Update src/lib.rs
Co-authored-by: Aaro Perämaa <[email protected]>
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) } } |