From 518da20b6b1536dbc7eaa9c2002d018bcd037653 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Wed, 3 Jul 2019 15:01:12 +0200 Subject: [PATCH] fmt --- src/memory/mod.rs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/memory/mod.rs b/src/memory/mod.rs index 506d5e4..4dd9786 100644 --- a/src/memory/mod.rs +++ b/src/memory/mod.rs @@ -12,6 +12,16 @@ use parity_wasm::elements::ResizableLimits; use value::LittleEndianConvert; use Error; +#[cfg(all(unix, not(feature = "vec_memory")))] +#[path = "mmap_bytebuf.rs"] +mod bytebuf; + +#[cfg(any(not(unix), feature = "vec_memory"))] +#[path = "vec_bytebuf.rs"] +mod bytebuf; + +use self::bytebuf::ByteBuf; + /// Size of a page of [linear memory][`MemoryInstance`] - 64KiB. /// /// The size of a memory is always a integer multiple of a page size. @@ -69,16 +79,6 @@ impl fmt::Debug for MemoryInstance { } } -#[cfg(all(unix, not(feature = "vec_memory")))] -#[path = "mmap_bytebuf.rs"] -mod bytebuf; - -#[cfg(any(not(unix), feature = "vec_memory"))] -#[path = "vec_bytebuf.rs"] -mod bytebuf; - -use self::bytebuf::ByteBuf; - struct CheckedRegion { offset: usize, size: usize, @@ -531,7 +531,6 @@ mod tests { #[cfg(target_pointer_width = "64")] fixtures.extend(&[ - (65536, Some(65536), true), (65536, Some(0), false), (65536, None, true),