cargo +nightly fmt (#3540)

* cargo +nightly fmt

* add cargo-fmt check to ci

* update ci

* fmt

* fmt

* skip macro

* ignore bridges
This commit is contained in:
Shawn Tabrizi
2021-08-02 12:47:33 +02:00
committed by GitHub
parent 30e3012270
commit ff5d56fb76
350 changed files with 20617 additions and 21266 deletions
@@ -17,8 +17,5 @@
use substrate_wasm_builder::WasmBuilder;
fn main() {
WasmBuilder::new()
.with_current_project()
.export_heap_base()
.build()
WasmBuilder::new().with_current_project().export_heap_base().build()
}
@@ -17,7 +17,10 @@
//! Basic parachain that executes forever.
#![no_std]
#![cfg_attr(not(feature = "std"), feature(core_intrinsics, lang_items, core_panic_info, alloc_error_handler))]
#![cfg_attr(
not(feature = "std"),
feature(core_intrinsics, lang_items, core_panic_info, alloc_error_handler)
)]
// Make the WASM binary available.
#[cfg(feature = "std")]
@@ -26,17 +29,17 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
#[cfg(feature = "std")]
/// Wasm binary unwrapped. If built with `BUILD_DUMMY_WASM_BINARY`, the function panics.
pub fn wasm_binary_unwrap() -> &'static [u8] {
WASM_BINARY.expect("Development wasm binary is not available. Testing is only \
supported with the flag disabled.")
WASM_BINARY.expect(
"Development wasm binary is not available. Testing is only \
supported with the flag disabled.",
)
}
#[cfg(not(feature = "std"))]
#[panic_handler]
#[no_mangle]
pub fn panic(_info: &core::panic::PanicInfo) -> ! {
unsafe {
core::intrinsics::abort()
}
unsafe { core::intrinsics::abort() }
}
#[cfg(not(feature = "std"))]
@@ -50,6 +53,6 @@ pub fn oom(_: core::alloc::Layout) -> ! {
#[cfg(not(feature = "std"))]
#[no_mangle]
pub extern fn validate_block(params: *const u8, len: usize) -> u64 {
pub extern "C" fn validate_block(params: *const u8, len: usize) -> u64 {
loop {}
}