From c684ea46f0ce2c6a322b414c784f9e293264c86a Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Thu, 28 Mar 2019 11:42:59 -0700 Subject: [PATCH] lint --- lib/runtime-abi/src/vfs/device_file.rs | 1 - lib/runtime-abi/src/vfs/virtual_file.rs | 2 +- lib/runtime-core/src/lib.rs | 12 +++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/runtime-abi/src/vfs/device_file.rs b/lib/runtime-abi/src/vfs/device_file.rs index e7ca46530..5dfdba495 100644 --- a/lib/runtime-abi/src/vfs/device_file.rs +++ b/lib/runtime-abi/src/vfs/device_file.rs @@ -48,7 +48,6 @@ impl FileLike for Stdout { fn set_file_len(&mut self, _len: usize) -> Result<(), failure::Error> { panic!("Cannot set length of stdout"); - } } diff --git a/lib/runtime-abi/src/vfs/virtual_file.rs b/lib/runtime-abi/src/vfs/virtual_file.rs index 14ffe6959..20bfa097e 100644 --- a/lib/runtime-abi/src/vfs/virtual_file.rs +++ b/lib/runtime-abi/src/vfs/virtual_file.rs @@ -2,7 +2,7 @@ use failure::Error; use crate::vfs::file_like::{FileLike, Metadata}; use std::io; -use std::io::{Seek, SeekFrom, Write, Read}; +use std::io::{Read, Seek, SeekFrom, Write}; impl FileLike for zbox::File { fn metadata(&self) -> Result { diff --git a/lib/runtime-core/src/lib.rs b/lib/runtime-core/src/lib.rs index 0e8d189f8..36bfcc221 100644 --- a/lib/runtime-core/src/lib.rs +++ b/lib/runtime-core/src/lib.rs @@ -67,11 +67,13 @@ pub fn compile_with( compiler: &dyn backend::Compiler, ) -> CompileResult { let token = backend::Token::generate(); - compiler.compile(wasm, Default::default(), token).map(|mut inner| { - let inner_info: &mut crate::module::ModuleInfo = &mut inner.info; - inner_info.import_custom_sections(wasm).unwrap(); - module::Module::new(Arc::new(inner)) - }) + compiler + .compile(wasm, Default::default(), token) + .map(|mut inner| { + let inner_info: &mut crate::module::ModuleInfo = &mut inner.info; + inner_info.import_custom_sections(wasm).unwrap(); + module::Module::new(Arc::new(inner)) + }) } /// The same as `compile_with` but changes the compiler behavior