fix visiblity, add copy/clone

This commit is contained in:
Robin Appelman 2026-11-19 21:25:20 +01:00
commit f4cd31b956
Signed by: robin
SSH key fingerprint: SHA256:kifqgrqnut7q1YUIrI0AdMNC23qiKAS/T9uGFmIYvbE
6 changed files with 8 additions and 8 deletions

2
Cargo.lock generated
View file

@ -1178,7 +1178,7 @@ dependencies = [
[[package]] [[package]]
name = "tf-log-parser" name = "tf-log-parser"
version = "0.1.3" version = "0.1.4"
dependencies = [ dependencies = [
"ahash", "ahash",
"chrono", "chrono",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "tf-log-parser" name = "tf-log-parser"
version = "0.1.3" version = "0.1.4"
edition = "2021" edition = "2021"
rust-version = "1.90.0" rust-version = "1.90.0"
description = "TF2 log parser with a focus on speed and flexibility" description = "TF2 log parser with a focus on speed and flexibility"

View file

@ -3,7 +3,7 @@ mod weapons;
use serde::Serialize; use serde::Serialize;
pub use weapons::Weapon; pub use weapons::Weapon;
#[derive(Serialize, PartialEq)] #[derive(Serialize, PartialEq, Clone, Copy)]
pub struct Position { pub struct Position {
pub x: i32, pub x: i32,
pub y: i32, pub y: i32,

View file

@ -3,7 +3,7 @@ use strum::{AsRefStr, EnumString};
use crate::Class; use crate::Class;
#[derive(EnumString, AsRefStr, Debug, PartialEq)] #[derive(EnumString, AsRefStr, Debug, PartialEq, Clone)]
#[strum(serialize_all = "snake_case")] #[strum(serialize_all = "snake_case")]
pub enum Weapon { pub enum Weapon {
Letranger, Letranger,

View file

@ -10,7 +10,7 @@ use ahash::AHashMap;
use serde::Serialize; use serde::Serialize;
use steamid_ng::SteamID; use steamid_ng::SteamID;
#[derive(Serialize, PartialEq)] #[derive(Serialize, PartialEq, Clone, Copy)]
pub struct Participant { pub struct Participant {
#[serde(with = "super::serde_steamid")] #[serde(with = "super::serde_steamid")]
pub id: SteamID, pub id: SteamID,
@ -23,7 +23,7 @@ impl Participant {
} }
} }
#[derive(Serialize, PartialEq)] #[derive(Serialize, PartialEq, Clone, Copy)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
pub enum KillKind { pub enum KillKind {
Normal, Normal,
@ -43,7 +43,7 @@ impl KillKind {
} }
} }
#[derive(Serialize, PartialEq)] #[derive(Serialize, PartialEq, Clone)]
pub struct Kill { pub struct Kill {
pub time: u32, pub time: u32,
pub killer: Participant, pub killer: Participant,

View file

@ -6,7 +6,7 @@ pub use chat::{ChatMessage, ChatMessages, ChatType};
use chrono::NaiveDateTime; use chrono::NaiveDateTime;
pub use classstats::{ClassStats, ClassStatsHandler}; pub use classstats::{ClassStats, ClassStatsHandler};
pub use healspread::HealSpread; pub use healspread::HealSpread;
pub use kills::{Kill, KillKind, Kills}; pub use kills::{Kill, KillKind, Kills, Participant};
pub use lobbysettings::{ pub use lobbysettings::{
LobbySettingsError, LobbySettingsHandler, Location, Settings as LobbySettings, LobbySettingsError, LobbySettingsHandler, Location, Settings as LobbySettings,
}; };