From f8ed0e2f1a5d96d9f2366f7a457c76fa528e1bb7 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 7 Aug 2020 13:16:21 +0200 Subject: [PATCH] Harmonise error messages --- src/ddr/arc.rs | 4 ++-- src/ddr/ssq.rs | 6 +++--- src/xact3/xwb.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ddr/arc.rs b/src/ddr/arc.rs index 3810e22..24b350c 100644 --- a/src/ddr/arc.rs +++ b/src/ddr/arc.rs @@ -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), diff --git a/src/ddr/ssq.rs b/src/ddr/ssq.rs index 12c5ba2..a1e35f8 100644 --- a/src/ddr/ssq.rs +++ b/src/ddr/ssq.rs @@ -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), diff --git a/src/xact3/xwb.rs b/src/xact3/xwb.rs index c8f2231..c8da9af 100644 --- a/src/xact3/xwb.rs +++ b/src/xact3/xwb.rs @@ -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),