Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vault"
version = "10.1.5"
version = "10.2.0"
edition = "2021"
authors = ["Ryan Taylor <2320507+ryantaylor@users.noreply.github.com>"]

Expand All @@ -15,7 +15,7 @@ exclude = ["replays/*", "build-doc.sh", ".travis.yml", "CoH3Rec.bt"]

[dependencies]
byteorder = "1"
magnus = { version = "0.7", optional = true }
magnus = { version = "0.8", optional = true }
nom = "7"
nom_locate = "4"
nom-tracable = "0.9"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vault

[![crates.io](https://img.shields.io/crates/v/vault.svg)](https://crates.io/crates/vault) [![Documentation](https://img.shields.io/badge/View-Documentation-blue.svg)](https://docs.rs/vault/10.1.5/vault/)
[![crates.io](https://img.shields.io/crates/v/vault.svg)](https://crates.io/crates/vault) [![Documentation](https://img.shields.io/badge/View-Documentation-blue.svg)](https://docs.rs/vault/10.2.0/vault/)

`vault` is a Company of Heroes replay parsing library written in [Rust](https://www.rust-lang.org/). It has been completely rewritten for Company of Heroes 3 to provide a more intuitive interface while simplifying the code and leveraging [nom](https://github.com/rust-bakery/nom)'s parser combinators to enable clean, fast parsing of Company of Heroes 3 replay files.

Expand Down Expand Up @@ -112,7 +112,7 @@ Ruby bindings have some additional compatibility requirements, such as `libclang

# Documentation

Documentation for `vault` [can be viewed online](https://docs.rs/vault/10.1.5/vault/).
Documentation for `vault` [can be viewed online](https://docs.rs/vault/10.2.0/vault/).

Alternatively, you can easily build an offline copy of the documentation for yourself with `cargo`:

Expand Down
4 changes: 2 additions & 2 deletions src/data/chunks/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl Chunk {
move |input: Span| {
let (input, header) = Header::parse(input)?;

return match &header.chunk_kind as &str {
match &header.chunk_kind as &str {
"DATA" => match &header.chunk_type as &str {
"AUTO" => DataAutoChunk::parse(input, header),
"DATA" => DataDataChunk::parse(input, header),
Expand All @@ -26,7 +26,7 @@ impl Chunk {
},
"FOLD" => FoldChunk::parse(input, header, version),
_ => panic!(),
};
}
}
}
}
1 change: 0 additions & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ use crate::data::Span;
/// that is, the first failure point hit will exit with an error. This type returns an error that
/// includes information on the segment of bytes being parsed and the location of the cursor at
/// time of failure.

pub type ParseError<'a> = nom::Err<nom::error::Error<Span<'a>>>;
2 changes: 1 addition & 1 deletion src/replay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Replay {
/// assert!(replay.is_ok())
/// }
/// ```
pub fn from_bytes(input: &[u8]) -> Result<Replay, ParseError> {
pub fn from_bytes(input: &[u8]) -> Result<Replay, ParseError<'_>> {
let info = TracableInfo::new().parser_width(64).fold("term");
let input: Span = LocatedSpan::new_extra(input, info);
let (_, replay) = ReplayData::from_span(input)?;
Expand Down
Loading