Don't trim msg twice

Fixes #102
This commit is contained in:
Florian Gilcher 2019-08-26 14:35:57 -07:00
parent bfaa9c510c
commit b768a7bab7
No known key found for this signature in database
GPG key ID: E7B51D33F8EBF61B

View file

@ -74,7 +74,7 @@ async fn client(mut broker: Sender<Event>, stream: TcpStream) -> Result<()> {
Some(idx) => (&line[..idx], line[idx + 1 ..].trim()), Some(idx) => (&line[..idx], line[idx + 1 ..].trim()),
}; };
let dest: Vec<String> = dest.split(',').map(|name| name.trim().to_string()).collect(); let dest: Vec<String> = dest.split(',').map(|name| name.trim().to_string()).collect();
let msg: String = msg.trim().to_string(); let msg: String = msg.to_string();
broker.send(Event::Message { // 4 broker.send(Event::Message { // 4
from: name.clone(), from: name.clone(),