rm unnecessary method call

This commit is contained in:
Ting Sun
2023-03-22 22:15:44 +08:00
committed by Carl Lerche
parent dcaa67388b
commit aab4e39d97
2 changed files with 2 additions and 2 deletions

View File

@@ -125,7 +125,7 @@ async fn main() -> mini_redis::Result<()> {
println!("OK"); println!("OK");
} }
Command::Publish { channel, message } => { Command::Publish { channel, message } => {
client.publish(&channel, message.into()).await?; client.publish(&channel, message).await?;
println!("Publish OK"); println!("Publish OK");
} }
Command::Subscribe { channels } => { Command::Subscribe { channels } => {

View File

@@ -35,7 +35,7 @@ type Messages = Pin<Box<dyn Stream<Item = Bytes> + Send>>;
impl Subscribe { impl Subscribe {
/// Creates a new `Subscribe` command to listen on the specified channels. /// Creates a new `Subscribe` command to listen on the specified channels.
pub(crate) fn new(channels: Vec<String>) -> Subscribe { pub(crate) fn new(channels: Vec<String>) -> Subscribe {
Subscribe {channels} Subscribe { channels }
} }
/// Parse a `Subscribe` instance from a received frame. /// Parse a `Subscribe` instance from a received frame.