rust/hedgewars-server/src/protocol.rs
changeset 14457 98ef2913ec73
parent 14415 06672690d71b
child 14775 09d46ab83361
--- 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!(),
         }