Skip to content

Commit 86440c5

Browse files
committed
misc: clippy
Signed-off-by: Anthony Griffon <[email protected]>
1 parent 44c2f4f commit 86440c5

File tree

1 file changed

+11
-11
lines changed
  • app/roster/src/application/server/cmd/client

1 file changed

+11
-11
lines changed

app/roster/src/application/server/cmd/client/list.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ pub struct ClientList {
2525
#[derive(Debug, Default)]
2626
pub enum ClientType {
2727
#[default]
28-
NORMAL,
29-
REPLICA,
30-
MASTER,
31-
PUBSUB,
28+
Normal,
29+
Replica,
30+
Master,
31+
Pubsub,
3232
}
3333

3434
impl ClientList {
@@ -40,7 +40,7 @@ impl ClientList {
4040
pub(crate) fn parse_frames(
4141
parse: &mut Parse,
4242
) -> anyhow::Result<ClientList> {
43-
let mut ty = ClientType::NORMAL;
43+
let mut ty = ClientType::Normal;
4444
let mut ids = Vec::new();
4545

4646
loop {
@@ -50,17 +50,17 @@ impl ClientList {
5050
Ok("type") => {
5151
let ty_opt = parse.next_string().map(|x| x.to_lowercase());
5252
ty = match ty_opt.as_ref().map(|x| &x[..]) {
53-
Ok("normal") => ClientType::NORMAL,
54-
Ok("replica") => ClientType::REPLICA,
55-
Ok("master") => ClientType::MASTER,
56-
Ok("pubsub") => ClientType::PUBSUB,
53+
Ok("normal") => ClientType::Normal,
54+
Ok("replica") => ClientType::Replica,
55+
Ok("master") => ClientType::Master,
56+
Ok("pubsub") => ClientType::Pubsub,
5757
Ok(_) => {
5858
bail!(
5959
"Unknown client type, should be either normal \
6060
/ replica / master / pubsub."
6161
);
6262
}
63-
Err(ParseError::EndOfStream) => ClientType::NORMAL,
63+
Err(ParseError::EndOfStream) => ClientType::Normal,
6464
Err(err) => {
6565
bail!("{}", err);
6666
}
@@ -112,7 +112,7 @@ impl ClientList {
112112
mod tests {
113113
use std::io::Cursor;
114114

115-
use bytes::{Bytes, BytesMut};
115+
use bytes::BytesMut;
116116
use redis_async::resp::{RespCodec, RespValue};
117117
use redis_async::resp_array;
118118
use tokio_util::codec::Encoder;

0 commit comments

Comments
 (0)