Fix error reporting wrong version

This commit is contained in:
Truman Kilen 2023-02-10 16:32:16 -06:00
parent 03358df460
commit d4a56617f8
2 changed files with 4 additions and 4 deletions

View file

@ -23,8 +23,8 @@ pub enum Error {
Magic(u32),
#[error("used version {used} but pak is version {version}")]
Version {
used: super::Version,
version: super::Version,
used: super::VersionMajor,
version: super::VersionMajor,
},
#[error("pak is encrypted but no key was provided")]
Encrypted,

View file

@ -62,8 +62,8 @@ impl Footer {
}
if version.version_major() != footer.version_major {
return Err(super::Error::Version {
used: version,
version: footer.version,
used: version.version_major(),
version: footer.version_major,
});
}
Ok(footer)