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), Magic(u32),
#[error("used version {used} but pak is version {version}")] #[error("used version {used} but pak is version {version}")]
Version { Version {
used: super::Version, used: super::VersionMajor,
version: super::Version, version: super::VersionMajor,
}, },
#[error("pak is encrypted but no key was provided")] #[error("pak is encrypted but no key was provided")]
Encrypted, Encrypted,

View file

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