Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
vikpe committed Aug 25, 2024
1 parent 2a6c115 commit a6d47fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ categories = ["parsing"]
keywords = ["demos", "mvd", "parser", "quake", "quakeworld"]
repository = "https://github.com/vikpe/mvdparser"
authors = ["Viktor Persson <viktor.persson@arcsin.se>"]
version = "0.15.4"
version = "0.16.0"
edition = "2021"
license = "MIT"
include = [
Expand All @@ -24,7 +24,7 @@ bstr = "1.9.1"
chrono = { version = "0.4.38", default-features = false }
ktxstats = "0.4.0"
quake_clientinfo = "0.3.0"
quake_serverinfo = "0.4.0"
quake_serverinfo = "0.7.0"
quake_text = "0.2.0"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub use quake_clientinfo::Clientinfo;
pub use quake_serverinfo::Serverinfo;
pub use quake_serverinfo::Settings;

pub use client::Client;
pub use player::Player;
Expand Down
12 changes: 6 additions & 6 deletions src/serverinfo.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use anyhow::{anyhow as e, Result};
use quake_serverinfo::Serverinfo;
use quake_serverinfo::Settings;

use crate::bytesextra;

pub fn serverinfo(data: &[u8]) -> Result<Serverinfo> {
serverinfo_string(data).map(|str| Serverinfo::from(str.as_str()))
pub fn serverinfo(data: &[u8]) -> Result<Settings> {
serverinfo_string(data).map(|str| Settings::from(str.as_str()))
}

pub fn serverinfo_string(data: &[u8]) -> Result<String> {
Expand All @@ -30,10 +30,10 @@ mod tests {
use super::*;

#[test]
fn test_serverinfo() -> Result<()> {
fn test_server_settings() -> Result<()> {
let data = read("tests/files/duel_holy_vs_dago[bravado]20240426-1659.mvd")?;

let expected = Serverinfo {
let expected = Settings {
admin: Some("suom1 <suom1@irc.ax>".to_string()),
deathmatch: Some(3),
epoch: None,
Expand Down Expand Up @@ -68,7 +68,7 @@ mod tests {
}

#[test]
fn test_serverinfo_string() -> Result<()> {
fn test_server_settings_string() -> Result<()> {
assert_eq!(
serverinfo_string(&read("tests/files/duel_equ_vs_kaboom[povdmm4]20240422-1038.mvd")?)?,
r#"\maxfps\77\pm_ktjump\1\*version\MVDSV 1.01-dev\*z_ext\511\maxspectators\12\*gamedir\qw\sv_antilag\2\*admin\ERRH @ https://discord.quake.world\ktxver\1.44-dev\mode\1on1\maxclients\2\timelimit\3\deathmatch\4\hostname\de.quake.world:27502 [QW-Group]\fpd\142\*qvm\so\*progs\so\map\povdmm4\status\Countdown\serverdemo\duel_equ_vs_kaboom[povdmm4]20240422-1038.mvd\epoch\1713782300"#.to_string()
Expand Down

0 comments on commit a6d47fc

Please sign in to comment.