--- a/rust/hedgewars-server/src/protocol.rs Sun Dec 16 00:09:20 2018 +0100
+++ b/rust/hedgewars-server/src/protocol.rs Sun Dec 16 00:12:29 2018 +0100
@@ -1,15 +1,11 @@
use netbuf;
-use std::{
- io::{Read, Result}
-};
-use nom::{
- IResult, Err
-};
+use nom::{Err, IResult};
+use std::io::{Read, Result};
pub mod messages;
+mod parser;
#[cfg(test)]
pub mod test;
-mod parser;
pub struct ProtocolDecoder {
buf: netbuf::Buf,
@@ -34,7 +30,7 @@
Ok((tail, msgs)) => {
self.consumed = self.buf.len() - self.consumed - tail.len();
msgs
- },
+ }
Err(Err::Incomplete(_)) => unreachable!(),
Err(Err::Error(_)) | Err(Err::Failure(_)) => unreachable!(),
}