aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Queseth <eskilq@kth.se>2020-11-05 02:35:15 +0100
committerEskil Queseth <eskilq@kth.se>2020-11-05 02:35:15 +0100
commit0220f0372937ed179aa84fa6e2250933cd3e3896 (patch)
tree8f3e8fa198747aa260128951eccd54994ca1fdb5
parent6b31f9e636059627a537e0dfb8ccb721296763f3 (diff)
downloadmum-0220f0372937ed179aa84fa6e2250933cd3e3896.tar.gz
remove redundancy in mumlib
-rw-r--r--mumd/src/state.rs2
-rw-r--r--mumlib/src/error.rs2
2 files changed, 1 insertions, 3 deletions
diff --git a/mumd/src/state.rs b/mumd/src/state.rs
index 37ff612..a767d30 100644
--- a/mumd/src/state.rs
+++ b/mumd/src/state.rs
@@ -303,7 +303,7 @@ impl State {
let (id, user) = match id {
Some(id) => (*id.0, id.1),
- None => return now!(Err(Error::InvalidUserIdentifierError(string))),
+ None => return now!(Err(Error::InvalidUsernameError(string))),
};
let action = match toggle {
diff --git a/mumlib/src/error.rs b/mumlib/src/error.rs
index 5b82fbd..1e79b9c 100644
--- a/mumlib/src/error.rs
+++ b/mumlib/src/error.rs
@@ -9,7 +9,6 @@ pub enum Error {
DisconnectedError,
AlreadyConnectedError,
ChannelIdentifierError(String, ChannelIdentifierError),
- InvalidUserIdentifierError(String),
InvalidServerAddrError(String, u16),
InvalidUsernameError(String),
}
@@ -23,7 +22,6 @@ impl Display for Error {
Error::InvalidServerAddrError(addr, port) => {
write!(f, "Invalid server address: {}: {}", addr, port)
}
- Error::InvalidUserIdentifierError(name) => write!(f, "Invalid username: {}", name),
Error::InvalidUsernameError(username) => write!(f, "Invalid username: {}", username),
}
}