diff options
-rw-r--r-- | src/message.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/message.rs b/src/message.rs index b7076d5..094720e 100644 --- a/src/message.rs +++ b/src/message.rs @@ -72,8 +72,8 @@ impl Message { let mut w = io::MemWriter::new(); // this should never fail, so unwrap is fine self.write_protocol_string(&mut w).unwrap(); - // XXX error handling, encoding - String::from_utf8(w.unwrap()).unwrap() + // XXX encoding + String::from_utf8_lossy(w.unwrap().as_slice()).into_string() } fn parse_params(params: &str) -> Vec<String> { |