Fixed bug in line protocol.
This commit is contained in:
parent
7d3e923de8
commit
6118516951
2 changed files with 1 additions and 4 deletions
|
@ -33,9 +33,6 @@ impl Decoder for LineCodec {
|
|||
// Remove the next frame from the buffer.
|
||||
let line = src.split_to(n + 1);
|
||||
|
||||
// Remove the new-line from the buffer.
|
||||
src.split_to(1);
|
||||
|
||||
// Decode the line using the codec's encoding.
|
||||
match self.encoding.decode(line.as_ref(), DecoderTrap::Replace) {
|
||||
Ok(data) => Ok(Some(data)),
|
||||
|
|
|
@ -39,7 +39,7 @@ impl Message {
|
|||
Ok(Message {
|
||||
tags: tags,
|
||||
prefix: prefix.map(|s| s.to_owned()),
|
||||
command: try!(Command::new(command, args, suffix)),
|
||||
command: Command::new(command, args, suffix)?,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue