rust/lib-hedgewars-engine/src/instance.rs
changeset 14315 21be7838a127
parent 14314 b8871dd33ec4
child 14723 29dbe9ce8b7d
--- a/rust/lib-hedgewars-engine/src/instance.rs	Sun Nov 25 05:52:06 2018 +0300
+++ b/rust/lib-hedgewars-engine/src/instance.rs	Sun Nov 25 22:32:49 2018 +0100
@@ -1,16 +1,11 @@
 use hedgewars_engine_messages::messages::{
     ConfigEngineMessage::*, EngineMessage::*, KeystrokeAction::*, SyncedEngineMessage::*,
-    UnorderedEngineMessage::*, UnsyncedEngineMessage::*, *
+    UnorderedEngineMessage::*, UnsyncedEngineMessage::*, *,
 };
 
-use gfx::{
-    format::{R8_G8_B8_A8, D24, Unorm}
-};
+use self::gfx_gl::{CommandBuffer, Resources};
+use gfx::format::{Unorm, D24, R8_G8_B8_A8};
 use gfx_device_gl as gfx_gl;
-use self::gfx_gl::{
-    Resources,
-    CommandBuffer
-};
 
 use super::{ipc::IPC, world::World};
 
@@ -19,13 +14,13 @@
     pub factory: gfx_gl::Factory,
     pub render_target: gfx::handle::RenderTargetView<Resources, (R8_G8_B8_A8, Unorm)>,
     pub depth_buffer: gfx::handle::DepthStencilView<Resources, (D24, Unorm)>,
-    pub command_buffer: gfx::Encoder<Resources, CommandBuffer>
+    pub command_buffer: gfx::Encoder<Resources, CommandBuffer>,
 }
 
 pub struct EngineInstance {
     pub world: World,
     pub ipc: IPC,
-    pub gl_context: Option<EngineGlContext>
+    pub gl_context: Option<EngineGlContext>,
 }
 
 impl EngineInstance {
@@ -34,7 +29,7 @@
         Self {
             world,
             ipc: IPC::new(),
-            gl_context: None
+            gl_context: None,
         }
     }
 
@@ -70,11 +65,11 @@
             println!("Processing message: {:?}", message);
             match message {
                 Unknown => println!("Unknown message"),
-                Empty => println!("Empty message") ,
+                Empty => println!("Empty message"),
                 Synced(_, _) => unimplemented!(),
                 Unsynced(_) => unimplemented!(),
                 Unordered(unordered_message) => self.process_unordered_message(&unordered_message),
-                Config(config_message) => self.process_config_message(&config_message)
+                Config(config_message) => self.process_config_message(&config_message),
             }
         }
     }