diff --git a/lib/environ/src/lib.rs b/lib/environ/src/lib.rs index b161c27445..810a8258b9 100644 --- a/lib/environ/src/lib.rs +++ b/lib/environ/src/lib.rs @@ -3,15 +3,32 @@ //! the translation the base addresses of regions of memory that will hold the globals, tables and //! linear memories. -#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)] +#![deny( + missing_docs, + trivial_numeric_casts, + unused_extern_crates, + unstable_features +)] #![warn(unused_import_braces)] -#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))] -#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))] +#![cfg_attr( + feature = "clippy", + plugin(clippy(conf_file = "../../clippy.toml")) +)] +#![cfg_attr( + feature = "cargo-clippy", + allow(new_without_default, new_without_default_derive) +)] #![cfg_attr( feature = "cargo-clippy", warn( - float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else, - print_stdout, unicode_not_nfc, use_self + float_arithmetic, + mut_mut, + nonminimal_bool, + option_map_unwrap_or, + option_map_unwrap_or_else, + print_stdout, + unicode_not_nfc, + use_self ) )] diff --git a/lib/execute/src/execute.rs b/lib/execute/src/execute.rs index 7c5621caca..54846f58fa 100644 --- a/lib/execute/src/execute.rs +++ b/lib/execute/src/execute.rs @@ -140,9 +140,10 @@ pub fn execute( } } - let code_buf = &compilation.functions[module.defined_func_index(start_index).expect( - "imported start functions not supported yet", - )]; + let code_buf = + &compilation.functions[module + .defined_func_index(start_index) + .expect("imported start functions not supported yet")]; // Collect all memory base addresses and Vec. let mut mem_base_addrs = instance diff --git a/lib/execute/src/lib.rs b/lib/execute/src/lib.rs index 04b7d254aa..3bf2646cd4 100644 --- a/lib/execute/src/lib.rs +++ b/lib/execute/src/lib.rs @@ -1,14 +1,31 @@ //! JIT-style runtime for WebAssembly using Cranelift. -#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)] +#![deny( + missing_docs, + trivial_numeric_casts, + unused_extern_crates, + unstable_features +)] #![warn(unused_import_braces)] -#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))] -#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))] +#![cfg_attr( + feature = "clippy", + plugin(clippy(conf_file = "../../clippy.toml")) +)] +#![cfg_attr( + feature = "cargo-clippy", + allow(new_without_default, new_without_default_derive) +)] #![cfg_attr( feature = "cargo-clippy", warn( - float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else, - print_stdout, unicode_not_nfc, use_self + float_arithmetic, + mut_mut, + nonminimal_bool, + option_map_unwrap_or, + option_map_unwrap_or_else, + print_stdout, + unicode_not_nfc, + use_self ) )] diff --git a/lib/obj/src/lib.rs b/lib/obj/src/lib.rs index 5d7b949d70..d8cb50abf9 100644 --- a/lib/obj/src/lib.rs +++ b/lib/obj/src/lib.rs @@ -1,14 +1,31 @@ //! Object-file writing library using the wasmtime environment. -#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)] +#![deny( + missing_docs, + trivial_numeric_casts, + unused_extern_crates, + unstable_features +)] #![warn(unused_import_braces)] -#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))] -#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))] +#![cfg_attr( + feature = "clippy", + plugin(clippy(conf_file = "../../clippy.toml")) +)] +#![cfg_attr( + feature = "cargo-clippy", + allow(new_without_default, new_without_default_derive) +)] #![cfg_attr( feature = "cargo-clippy", warn( - float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else, - print_stdout, unicode_not_nfc, use_self + float_arithmetic, + mut_mut, + nonminimal_bool, + option_map_unwrap_or, + option_map_unwrap_or_else, + print_stdout, + unicode_not_nfc, + use_self ) )] diff --git a/src/main.rs b/src/main.rs index 402ac05d5c..2ee9d30168 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,15 +5,31 @@ //! IL. Can also executes the `start` function of the module by laying out the memories, globals //! and tables, then emitting the translated code with hardcoded addresses to memory. -#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)] +#![deny( + missing_docs, + trivial_numeric_casts, + unused_extern_crates, + unstable_features +)] #![warn(unused_import_braces)] -#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))] -#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))] +#![cfg_attr( + feature = "clippy", + plugin(clippy(conf_file = "../../clippy.toml")) +)] +#![cfg_attr( + feature = "cargo-clippy", + allow(new_without_default, new_without_default_derive) +)] #![cfg_attr( feature = "cargo-clippy", warn( - float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else, - unicode_not_nfc, use_self + float_arithmetic, + mut_mut, + nonminimal_bool, + option_map_unwrap_or, + option_map_unwrap_or_else, + unicode_not_nfc, + use_self ) )] @@ -78,8 +94,7 @@ fn main() { d.help(true) .version(Some(String::from("0.0.0"))) .deserialize() - }) - .unwrap_or_else(|e| e.exit()); + }).unwrap_or_else(|e| e.exit()); let (mut flag_builder, isa_builder) = cranelift_native::builders().unwrap_or_else(|_| { panic!("host machine is not a supported target"); }); diff --git a/src/wasm2obj.rs b/src/wasm2obj.rs index b5e9183dff..feac42302f 100644 --- a/src/wasm2obj.rs +++ b/src/wasm2obj.rs @@ -4,15 +4,31 @@ //! IL, then translates it to native code, and writes it out to a native //! object file with relocations. -#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates, unstable_features)] +#![deny( + missing_docs, + trivial_numeric_casts, + unused_extern_crates, + unstable_features +)] #![warn(unused_import_braces)] -#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))] -#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, new_without_default_derive))] +#![cfg_attr( + feature = "clippy", + plugin(clippy(conf_file = "../../clippy.toml")) +)] +#![cfg_attr( + feature = "cargo-clippy", + allow(new_without_default, new_without_default_derive) +)] #![cfg_attr( feature = "cargo-clippy", warn( - float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else, - unicode_not_nfc, use_self + float_arithmetic, + mut_mut, + nonminimal_bool, + option_map_unwrap_or, + option_map_unwrap_or_else, + unicode_not_nfc, + use_self ) )] @@ -74,8 +90,7 @@ fn main() { d.help(true) .version(Some(String::from("0.0.0"))) .deserialize() - }) - .unwrap_or_else(|e| e.exit()); + }).unwrap_or_else(|e| e.exit()); let path = Path::new(&args.arg_file); match handle_module(path.to_path_buf(), &args.arg_output) {