Harmonise error messages

master
Simon Bruder 2020-08-07 13:16:21 +02:00
parent a252a3d444
commit f8ed0e2f1a
No known key found for this signature in database
GPG Key ID: 6F03E0000CC5B62F
3 changed files with 6 additions and 6 deletions

View File

@ -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),

View File

@ -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),

View File

@ -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),