aboutsummaryrefslogtreecommitdiffstats
path: root/mumlib
diff options
context:
space:
mode:
Diffstat (limited to 'mumlib')
-rw-r--r--mumlib/Cargo.toml2
-rw-r--r--mumlib/src/error.rs11
-rw-r--r--mumlib/src/state.rs7
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,
"{} {}{}{}{}{}",