Skip to content

Commit b768a7b

Browse files
committed
Don't trim msg twice
Fixes #102
1 parent bfaa9c5 commit b768a7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/tutorial/all_together.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ async fn client(mut broker: Sender<Event>, stream: TcpStream) -> Result<()> {
7474
Some(idx) => (&line[..idx], line[idx + 1 ..].trim()),
7575
};
7676
let dest: Vec<String> = dest.split(',').map(|name| name.trim().to_string()).collect();
77-
let msg: String = msg.trim().to_string();
77+
let msg: String = msg.to_string();
7878
7979
broker.send(Event::Message { // 4
8080
from: name.clone(),

0 commit comments

Comments
 (0)