From aab4e39d974a58104988dd1702708feeee201824 Mon Sep 17 00:00:00 2001 From: Ting Sun Date: Wed, 22 Mar 2023 22:15:44 +0800 Subject: [PATCH] rm unnecessary method call --- src/bin/cli.rs | 2 +- src/cmd/subscribe.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/cli.rs b/src/bin/cli.rs index 4e7d354..ba98a60 100644 --- a/src/bin/cli.rs +++ b/src/bin/cli.rs @@ -125,7 +125,7 @@ async fn main() -> mini_redis::Result<()> { println!("OK"); } Command::Publish { channel, message } => { - client.publish(&channel, message.into()).await?; + client.publish(&channel, message).await?; println!("Publish OK"); } Command::Subscribe { channels } => { diff --git a/src/cmd/subscribe.rs b/src/cmd/subscribe.rs index 5102598..ba13390 100644 --- a/src/cmd/subscribe.rs +++ b/src/cmd/subscribe.rs @@ -35,7 +35,7 @@ type Messages = Pin + Send>>; impl Subscribe { /// Creates a new `Subscribe` command to listen on the specified channels. pub(crate) fn new(channels: Vec) -> Subscribe { - Subscribe {channels} + Subscribe { channels } } /// Parse a `Subscribe` instance from a received frame.