From d85c652d8f5e3c01fec988cc77f2e199dc2f3dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sat, 3 Apr 2021 11:09:06 +0200 Subject: clap -> structopt I tried to translate the current clap-code into structopt and save any modifications for later, /but/, some things would've taken too much energy. But I've forgotten what those were. --- mumlib/Cargo.toml | 4 ++-- mumlib/src/error.rs | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'mumlib') diff --git a/mumlib/Cargo.toml b/mumlib/Cargo.toml index 43bd8c5..183ebac 100644 --- a/mumlib/Cargo.toml +++ b/mumlib/Cargo.toml @@ -11,9 +11,9 @@ repository = "https://github.com/sornas/mum" license = "MIT" [dependencies] -colored = "2.0" +colored = "2" dirs = "3" fern = "0.6" log = "0.4" -serde = { version = "1.0", features = ["derive"] } +serde = { version = "1", features = ["derive"] } toml = "0.5" diff --git a/mumlib/src/error.rs b/mumlib/src/error.rs index 6b7dccd..459ede0 100644 --- a/mumlib/src/error.rs +++ b/mumlib/src/error.rs @@ -13,6 +13,8 @@ pub enum Error { InvalidServerPassword, } +impl std::error::Error for Error {} + impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { @@ -43,6 +45,9 @@ impl fmt::Display for ChannelIdentifierError { } } +impl std::error::Error for ChannelIdentifierError {} + +#[derive(Debug)] pub enum ConfigError { InvalidConfig, TOMLErrorSer(toml::ser::Error), @@ -52,6 +57,8 @@ pub enum ConfigError { IOError(std::io::Error), } +impl std::error::Error for ConfigError {} + impl fmt::Display for ConfigError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { -- cgit v1.2.1 From 52743bafca48a79990318e1f31b2a1e31bc7c598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Thu, 8 Apr 2021 13:18:47 +0200 Subject: add readme to all Cargo.toml --- mumlib/Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'mumlib') diff --git a/mumlib/Cargo.toml b/mumlib/Cargo.toml index 183ebac..245b108 100644 --- a/mumlib/Cargo.toml +++ b/mumlib/Cargo.toml @@ -9,6 +9,7 @@ Exposed parts of mum. """ repository = "https://github.com/sornas/mum" license = "MIT" +readme = "../README.md" [dependencies] colored = "2" -- cgit v1.2.1