From 379e960c949793d694c98a54b353926f6ff05a20 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Mon, 15 Apr 2019 17:35:29 +0200 Subject: [PATCH] Clean. --- validation/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/validation/src/lib.rs b/validation/src/lib.rs index aeb5b26..6a0df73 100644 --- a/validation/src/lib.rs +++ b/validation/src/lib.rs @@ -18,6 +18,9 @@ pub const DEFAULT_MEMORY_INDEX: u32 = 0; /// Index of default table. pub const DEFAULT_TABLE_INDEX: u32 = 0; +/// Maximal number of pages that a wasm instance supports. +pub const LINEAR_MEMORY_MAX_PAGES: Pages = Pages(65536); + #[allow(unused_imports)] use alloc::prelude::*; use core::fmt; @@ -441,9 +444,6 @@ fn validate_memory_type(memory_type: &MemoryType) -> Result<(), Error> { validate_memory(initial, maximum).map_err(Error) } -/// Maximal number of pages that a wasm instance supports. -pub const LINEAR_MEMORY_MAX_PAGES: Pages = Pages(65536); - pub fn validate_memory(initial: Pages, maximum: Option) -> Result<(), String> { if initial > LINEAR_MEMORY_MAX_PAGES { return Err(format!(