summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2023-05-29 18:01:12 +0200
committerfxqnlr <[email protected]>2023-05-29 18:01:12 +0200
commitc7ecf3019a75dc0ab1a0aefeb9b880899fc8a231 (patch)
tree116075aaa57c35afca2749719d450c3cb473ab3e /src/error.rs
parent7755c9acf6b8a1d81c03ef1138e80a162f36e743 (diff)
downloadmodlist-c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231.tar
modlist-c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231.tar.gz
modlist-c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231.zip
cargo fmt and add fmt file
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs
index f981f14..a2b37a8 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -34,8 +34,12 @@ impl std::error::Error for MLError {
34impl fmt::Display for MLError { 34impl fmt::Display for MLError {
35 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 35 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
36 match self.etype { 36 match self.etype {
37 ErrorType::ArgumentError => write!(f, "User input not accepted: {}", self.message), 37 ErrorType::ArgumentError => {
38 ErrorType::ArgumentCountError => write!(f, "Too many/too few arguments"), 38 write!(f, "User input not accepted: {}", self.message)
39 }
40 ErrorType::ArgumentCountError => {
41 write!(f, "Too many/too few arguments")
42 }
39 ErrorType::ConfigError => write!(f, "CONFIG"), 43 ErrorType::ConfigError => write!(f, "CONFIG"),
40 ErrorType::DBError => write!(f, "Database: {}", self.message), 44 ErrorType::DBError => write!(f, "Database: {}", self.message),
41 ErrorType::ModError => write!(f, "Mod: {}", self.message), 45 ErrorType::ModError => write!(f, "Mod: {}", self.message),