mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-11-30 04:40:47 +01:00
btreemap
This commit is contained in:
parent
9c63c8b658
commit
eba1c81126
4 changed files with 23 additions and 10 deletions
|
|
@ -2,6 +2,7 @@ use crate::raw_event::RawSubject;
|
|||
use enum_iterator::IntoEnumIterator;
|
||||
use serde::ser::SerializeMap;
|
||||
use serde::{Serialize, Serializer};
|
||||
use std::cmp::Ordering;
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::ops::{Index, IndexMut};
|
||||
|
|
@ -249,6 +250,18 @@ impl TryFrom<&RawSubject<'_>> for SubjectData {
|
|||
#[derive(Debug, Hash, Eq, PartialEq)]
|
||||
pub struct SteamId3(pub SteamID);
|
||||
|
||||
impl PartialOrd<Self> for SteamId3 {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
(u64::from(self.0)).partial_cmp(&u64::from(other.0))
|
||||
}
|
||||
}
|
||||
|
||||
impl Ord for SteamId3 {
|
||||
fn cmp(&self, other: &Self) -> Ordering {
|
||||
(u64::from(self.0)).cmp(&u64::from(other.0))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<SteamID> for SteamId3 {
|
||||
fn from(id: SteamID) -> Self {
|
||||
SteamId3(id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue