fmt (#34)
This commit is contained in:
@@ -24,13 +24,15 @@ pub async fn main() -> Result<()> {
|
||||
// Open a connection to the mini-redis address.
|
||||
let client = client::connect("127.0.0.1:6379").await?;
|
||||
|
||||
|
||||
// subscribe to channel foo
|
||||
let mut subscriber = client.subscribe(vec!["foo".into()]).await?;
|
||||
|
||||
// await messages on channel foo
|
||||
if let Some(msg) = subscriber.next_message().await? {
|
||||
println!("got message from the channel: {}; message = {:?}", msg.channel, msg.content);
|
||||
println!(
|
||||
"got message from the channel: {}; message = {:?}",
|
||||
msg.channel, msg.content
|
||||
);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user