Harmonise error messages
This commit is contained in:
parent
a252a3d444
commit
f8ed0e2f1a
|
@ -19,9 +19,9 @@ const MAGIC: u32 = 0x19751120;
|
|||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
#[error("Invalid magic (expected {expected:#x}, found {found:#x})")]
|
||||
#[error("invalid magic (expected {expected:#x}, found {found:#x})")]
|
||||
InvalidMagic { expected: u32, found: u32 },
|
||||
#[error("Invalid size after decompresseion (expected {expected}, found {found})")]
|
||||
#[error("invalid size after decompresseion (expected {expected}, found {found})")]
|
||||
DecompressionSize { expected: usize, found: usize },
|
||||
#[error(transparent)]
|
||||
IOError(#[from] io::Error),
|
||||
|
|
|
@ -18,11 +18,11 @@ const MEASURE_LENGTH: f32 = 4096.0;
|
|||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
#[error("Not enough freeze data was found")]
|
||||
#[error("not enough freeze data was found")]
|
||||
NotEnoughFreezeData,
|
||||
#[error("Invalid player count {0} (valid options: 1, 2)")]
|
||||
#[error("invalid player count {0} (valid options: 1, 2)")]
|
||||
InvalidPlayerCount(u8),
|
||||
#[error("Invalid difficulty {0} (valid options: 4, 1, 2, 3, 6)")]
|
||||
#[error("invalid difficulty {0} (valid options: 4, 1, 2, 3, 6)")]
|
||||
InvalidDifficulty(u8),
|
||||
#[error(transparent)]
|
||||
IOError(#[from] io::Error),
|
||||
|
|
|
@ -18,7 +18,7 @@ use crate::xact3::adpcm;
|
|||
pub enum Error {
|
||||
#[error("{0:?} is not a supported format")]
|
||||
UnsupportedFormat(FormatTag),
|
||||
#[error("Invalid magic: expected “WBND”, found “{0}”")]
|
||||
#[error("invalid magic (expected “WBND”, found “{0}”)")]
|
||||
InvalidMagic(String),
|
||||
#[error(transparent)]
|
||||
IOError(#[from] io::Error),
|
||||
|
|
Reference in a new issue