mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
fix test
fix doc test
This commit is contained in:
parent
8e34cb6818
commit
62798fd966
@ -29,7 +29,7 @@ pub use wasmer_runtime_core::cache::{Artifact, Cache, WasmHash, WASMER_VERSION_H
|
|||||||
/// // corrupted or tampered with.
|
/// // corrupted or tampered with.
|
||||||
/// let mut fs_cache = unsafe { FileSystemCache::new("some/directory/goes/here")? };
|
/// let mut fs_cache = unsafe { FileSystemCache::new("some/directory/goes/here")? };
|
||||||
/// // Compute a key for a given WebAssembly binary
|
/// // Compute a key for a given WebAssembly binary
|
||||||
/// let key = WasmHash::generate(&[], Backend::Cranelift);
|
/// let key = WasmHash::generate_for_backend(&[], Backend::Cranelift);
|
||||||
/// // Store a module into the cache given a key
|
/// // Store a module into the cache given a key
|
||||||
/// fs_cache.store(key, module.clone())?;
|
/// fs_cache.store(key, module.clone())?;
|
||||||
/// Ok(module)
|
/// Ok(module)
|
||||||
@ -120,7 +120,6 @@ mod tests {
|
|||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use std::env;
|
use std::env;
|
||||||
use wasmer_runtime_core::backend::Backend;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_file_system_cache_run() {
|
fn test_file_system_cache_run() {
|
||||||
@ -149,7 +148,7 @@ mod tests {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
};
|
};
|
||||||
// store module
|
// store module
|
||||||
let key = WasmHash::generate(&wasm, Backend::Cranelift);
|
let key = WasmHash::generate(&wasm);
|
||||||
fs_cache.store(key, module.clone()).unwrap();
|
fs_cache.store(key, module.clone()).unwrap();
|
||||||
|
|
||||||
// load module
|
// load module
|
||||||
|
Loading…
Reference in New Issue
Block a user