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