1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-03 18:54:05 +02:00

bumb dependencies

This commit is contained in:
Robin Appelman 2022-02-17 21:27:52 +01:00
commit f890ff2847
3 changed files with 14 additions and 11 deletions

View file

@ -10,15 +10,15 @@ edition = "2018"
readme = "README.md"
[dependencies]
arrayvec = "0.5"
arrayvec = "0.7.2"
bitflags = "1.0"
bv = "0.11"
itertools = "0.10"
thiserror = "1.0"
lzma-rs = "0.1"
binread = "1.0"
parse-display = "0.4"
static_assertions = "1.1"
bv = "0.11.1"
itertools = "0.10.3"
thiserror = "1.0.30"
lzma-rs = "0.2.0"
binread = "2.2.0"
parse-display = "0.5.3"
static_assertions = "1.1.0"
[dev-dependencies]
obj = "0.10"

View file

@ -61,7 +61,7 @@ impl<'a> BspFile<'a> {
let mut cursor = Cursor::new(raw_data);
if b"LZMA" != &<[u8; 4]>::read(&mut cursor)? {
return Err(BspError::LumpDecompressError(
lzma_rs::error::Error::LZMAError("Invalid lzma header".into()),
lzma_rs::error::Error::LzmaError("Invalid lzma header".into()),
));
}
let actual_size: u32 = cursor.read_le()?;
@ -71,6 +71,8 @@ impl<'a> BspFile<'a> {
&mut data,
&Options {
unpacked_size: UnpackedSize::UseProvided(Some(actual_size as u64)),
allow_incomplete: false,
memlimit: None,
},
)
.map_err(BspError::LumpDecompressError)?;

View file

@ -73,6 +73,7 @@ impl fmt::Debug for Entities {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
#[derive(Debug)]
struct Entities<'a> {
#[allow(dead_code)]
entities: Vec<Entity<'a>>,
}
@ -178,7 +179,7 @@ bitflags! {
}
#[derive(Debug, Display, Clone)]
pub struct Name(ArrayString<[u8; 64]>);
pub struct Name(ArrayString<64>);
impl BinRead for Name {
type Args = ();
@ -201,7 +202,7 @@ impl BinRead for Name {
.iter()
.position(|c| *c == 0)
.ok_or_else(|| binread::Error::AssertFail {
pos: reader.seek(SeekFrom::Current(0)).unwrap() as usize,
pos: reader.seek(SeekFrom::Current(0)).unwrap(),
message: "Name not null terminated".to_string(),
})?;
let name = &name_buf[..zero_pos];