rust/hedgewars-server/src/server/io.rs
changeset 14802 01f8ab45f806
parent 14801 65861ba8b4e8
child 14806 a1077e8d26f4
--- a/rust/hedgewars-server/src/server/io.rs	Tue Apr 09 23:03:12 2019 +0300
+++ b/rust/hedgewars-server/src/server/io.rs	Wed Apr 10 01:13:29 2019 +0300
@@ -9,9 +9,9 @@
     database::Database,
     handlers::{IoResult, IoTask},
 };
+use log::*;
 use mio::{Evented, Poll, PollOpt};
 use mio_extras::channel;
-use log::*;
 
 pub type RequestId = u32;
 
@@ -45,17 +45,19 @@
                             &client_salt,
                             &server_salt,
                         ) {
-                            Ok(account) => {
-                                IoResult::Account(account)
-                            }
+                            Ok(account) => IoResult::Account(account),
                             Err(..) => {
                                 warn!("Unable to get account data: {}", 0);
                                 IoResult::Account(None)
                             }
                         }
-                    },
+                    }
 
-                    IoTask::SaveRoom { room_id, filename, contents} => {
+                    IoTask::SaveRoom {
+                        room_id,
+                        filename,
+                        contents,
+                    } => {
                         let result = match save_file(&filename, &contents) {
                             Ok(()) => true,
                             Err(e) => {
@@ -64,12 +66,12 @@
                                     filename, e
                                 );
                                 false
-                           }
+                            }
                         };
                         IoResult::SaveRoom(room_id, result)
-                    },
+                    }
 
-                    IoTask::LoadRoom {room_id, filename} => {
+                    IoTask::LoadRoom { room_id, filename } => {
                         let result = match load_file(&filename) {
                             Ok(contents) => Some(contents),
                             Err(e) => {
@@ -118,4 +120,4 @@
     let mut result = String::new();
     reader.read_to_string(&mut result)?;
     Ok(result)
-}
\ No newline at end of file
+}