Skip to content

Commit

Permalink
Implement is_nil correctly
Browse files Browse the repository at this point in the history
Co-authored-by: Kenneth Loeffler <[email protected]>
  • Loading branch information
Dekkonot and kennethloeffler authored Aug 3, 2023
1 parent 9cfc706 commit 2880bc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rbx_types/src/unique_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl UniqueId {
/// Returns whether this `UniqueId` is 'nil' or not. That is, whether
/// every field of the UniqueId is set to `0`.
pub fn is_nil(&self) -> bool {
self.time != 0 && self.index != 0 && self.random != 0
self.time == 0 && self.index == 0 && self.random == 0
}

/// The 'time' portion of the UniqueId. This is the number of seconds since
Expand Down

0 comments on commit 2880bc0

Please sign in to comment.