Skip to content

Commit c7c5042

Browse files
authored
Bump version up to 0.8.0 (#249)
* Bump version up to 0.8.0 * Please clippy
1 parent 8871f9d commit c7c5042

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wasmi"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
edition = "2018"
55
authors = ["Nikolay Volf <nikvolf@gmail.com>", "Svyatoslav Nikolsky <svyatonik@yandex.ru>", "Sergey Pepyakin <s.pepyakin@gmail.com>"]
66
license = "MIT/Apache-2.0"

src/memory/mod.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,16 @@ impl MemoryInstance {
121121
let initial_u32: u32 = initial.0.try_into().map_err(|_| {
122122
Error::Memory(format!("initial ({}) can't be coerced to u32", initial.0))
123123
})?;
124-
let maximum_u32: Option<u32> = match maximum {
125-
Some(maximum_pages) => Some(maximum_pages.0.try_into().map_err(|_| {
126-
Error::Memory(format!(
127-
"maximum ({}) can't be coerced to u32",
128-
maximum_pages.0
129-
))
130-
})?),
131-
None => None,
132-
};
124+
let maximum_u32: Option<u32> = maximum
125+
.map(|maximum_pages| {
126+
maximum_pages.0.try_into().map_err(|_| {
127+
Error::Memory(format!(
128+
"maximum ({}) can't be coerced to u32",
129+
maximum_pages.0
130+
))
131+
})
132+
})
133+
.transpose()?;
133134
validation::validate_memory(initial_u32, maximum_u32).map_err(Error::Memory)?;
134135
}
135136

src/prepare/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Validator for WasmiValidation {
4343
/// Validate a module and compile it to the internal representation.
4444
pub fn compile_module(module: Module) -> Result<CompiledModule, Error> {
4545
let code_map = validate_module::<WasmiValidation>(&module)?;
46-
Ok(CompiledModule { module, code_map })
46+
Ok(CompiledModule { code_map, module })
4747
}
4848

4949
/// Verify that the module doesn't use floating point instructions or types.

0 commit comments

Comments
 (0)