diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-03-22 00:18:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-22 00:18:39 +0100 |
| commit | 97bfcac402c06fd051f5a8c3c05384d5a2972d50 (patch) | |
| tree | 65f327da854672fb0afc59c7ab66c7a9725258d8 /mumlib | |
| parent | 4458c3455c467ac0b97fecfd5ff2cbd77b6ac52b (diff) | |
| parent | 433cd3d452ab68236b9347e74b1d8b305b0b4c52 (diff) | |
| download | mum-97bfcac402c06fd051f5a8c3c05384d5a2972d50.tar.gz | |
Merge pull request #70 from mum-rs/dep-maint
Diffstat (limited to 'mumlib')
| -rw-r--r-- | mumlib/Cargo.toml | 2 | ||||
| -rw-r--r-- | mumlib/src/error.rs | 11 | ||||
| -rw-r--r-- | mumlib/src/state.rs | 7 |
3 files changed, 9 insertions, 11 deletions
diff --git a/mumlib/Cargo.toml b/mumlib/Cargo.toml index e439e77..240e017 100644 --- a/mumlib/Cargo.toml +++ b/mumlib/Cargo.toml @@ -12,7 +12,7 @@ license = "MIT" [dependencies] colored = "2.0" -fern = "0.5" +fern = "0.6" log = "0.4" serde = { version = "1.0", features = ["derive"] } toml = "0.5" diff --git a/mumlib/src/error.rs b/mumlib/src/error.rs index 1e79b9c..8c66068 100644 --- a/mumlib/src/error.rs +++ b/mumlib/src/error.rs @@ -1,6 +1,5 @@ -use serde::export::Formatter; use serde::{Deserialize, Serialize}; -use std::fmt::Display; +use std::fmt; pub type Result<T> = std::result::Result<T, Error>; @@ -13,8 +12,8 @@ pub enum Error { InvalidUsernameError(String), } -impl Display for Error { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Error::DisconnectedError => write!(f, "Not connected to a server"), Error::AlreadyConnectedError => write!(f, "Already connected to a server"), @@ -33,8 +32,8 @@ pub enum ChannelIdentifierError { Ambiguous, } -impl Display for ChannelIdentifierError { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { +impl fmt::Display for ChannelIdentifierError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { ChannelIdentifierError::Invalid => write!(f, "Invalid channel identifier"), ChannelIdentifierError::Ambiguous => write!(f, "Ambiguous channel identifier"), diff --git a/mumlib/src/state.rs b/mumlib/src/state.rs index faf0c60..86cbfea 100644 --- a/mumlib/src/state.rs +++ b/mumlib/src/state.rs @@ -1,6 +1,5 @@ -use serde::export::Formatter; use serde::{Deserialize, Serialize}; -use std::fmt::Display; +use std::fmt; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Server { @@ -143,8 +142,8 @@ macro_rules! true_to_str { }; } -impl Display for User { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { +impl fmt::Display for User { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, "{} {}{}{}{}{}", |
