mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
more tick comparison
This commit is contained in:
parent
0c91b4b274
commit
88314634cb
1 changed files with 25 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ use bitbuffer::{BitRead, BitReadStream, BitWrite, BitWriteStream, Endianness};
|
|||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use std::cmp::Ordering;
|
||||
use std::fmt::{Debug, Display, Formatter};
|
||||
use std::ops::{Add, Range, RangeInclusive, Sub};
|
||||
use std::ops::{Add, Sub};
|
||||
|
||||
pub use userinfo::UserInfo;
|
||||
|
||||
|
|
@ -166,6 +166,18 @@ impl PartialOrd<u32> for ServerTick {
|
|||
}
|
||||
}
|
||||
|
||||
impl PartialEq<ServerTick> for u32 {
|
||||
fn eq(&self, other: &ServerTick) -> bool {
|
||||
self.eq(&other.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialOrd<ServerTick> for u32 {
|
||||
fn partial_cmp(&self, other: &ServerTick) -> Option<Ordering> {
|
||||
self.partial_cmp(&other.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u32> for ServerTick {
|
||||
fn from(tick: u32) -> Self {
|
||||
ServerTick(tick)
|
||||
|
|
@ -246,6 +258,18 @@ impl PartialOrd<u32> for DemoTick {
|
|||
}
|
||||
}
|
||||
|
||||
impl PartialEq<DemoTick> for u32 {
|
||||
fn eq(&self, other: &DemoTick) -> bool {
|
||||
self.eq(&other.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialOrd<DemoTick> for u32 {
|
||||
fn partial_cmp(&self, other: &DemoTick) -> Option<Ordering> {
|
||||
self.partial_cmp(&other.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u32> for DemoTick {
|
||||
fn from(tick: u32) -> Self {
|
||||
DemoTick(tick)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue