mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 10:44:07 +02:00
bumb dependencies
This commit is contained in:
parent
231e3256c5
commit
f890ff2847
3 changed files with 14 additions and 11 deletions
|
|
@ -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)?;
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue