mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-06-03 18:24:09 +02:00
remove some unneeded trims
This commit is contained in:
parent
9ad8a1fd9f
commit
c09508e9fa
2 changed files with 5 additions and 5 deletions
|
|
@ -16,7 +16,7 @@
|
||||||
in rec {
|
in rec {
|
||||||
# `nix develop`
|
# `nix develop`
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated clippy cargo-audit cargo-msrv valgrind];
|
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated clippy cargo-audit cargo-msrv valgrind hyperfine];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,13 @@ fn event_parser(input: &str) -> Result<RawEvent> {
|
||||||
|
|
||||||
let (input, subject) = subject_parser(&input[23..])?;
|
let (input, subject) = subject_parser(&input[23..])?;
|
||||||
|
|
||||||
let (input, ty) = event_type_parser(input.trim_start())?;
|
let (input, ty) = event_type_parser(&input[1..])?;
|
||||||
|
|
||||||
Ok(RawEvent {
|
Ok(RawEvent {
|
||||||
date,
|
date,
|
||||||
subject,
|
subject,
|
||||||
ty,
|
ty,
|
||||||
params: input.trim(),
|
params: &input[1..],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -130,8 +130,8 @@ pub fn subject_parser(input: &str) -> Result<(&str, RawSubject)> {
|
||||||
Ok((input, RawSubject::Team(Team::Spectator)))
|
Ok((input, RawSubject::Team(Team::Spectator)))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let (system, input) = input.split_once(' ').ok_or(Error::Incomplete)?;
|
let (system, _) = input.split_once(' ').ok_or(Error::Incomplete)?;
|
||||||
Ok((input, RawSubject::System(system)))
|
Ok((&input[system.len()..], RawSubject::System(system)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue