Fixed Caching in Windows lint and improved code

This commit is contained in:
Syrus Akbary 2019-07-29 18:29:20 -07:00
parent 7bceb08b64
commit 98b20d9240
3 changed files with 3 additions and 6 deletions

View File

@ -241,5 +241,3 @@ pub trait Cache {
/// A unique ID generated from the version of Wasmer for use with cache versioning /// A unique ID generated from the version of Wasmer for use with cache versioning
pub const WASMER_VERSION_HASH: &'static str = pub const WASMER_VERSION_HASH: &'static str =
include_str!(concat!(env!("OUT_DIR"), "/wasmer_version_hash.txt")); include_str!(concat!(env!("OUT_DIR"), "/wasmer_version_hash.txt"));
pub const WASMER_VERSION: &'static str = env!("CARGO_PKG_VERSION");

View File

@ -9,7 +9,7 @@ use std::{
use wasmer_runtime_core::cache::Error as CacheError; use wasmer_runtime_core::cache::Error as CacheError;
pub use wasmer_runtime_core::{ pub use wasmer_runtime_core::{
backend::Backend, backend::Backend,
cache::{Artifact, Cache, WasmHash, WASMER_VERSION}, cache::{Artifact, Cache, WasmHash},
}; };
/// Representation of a directory that contains compiled wasm artifacts. /// Representation of a directory that contains compiled wasm artifacts.

View File

@ -818,8 +818,7 @@ fn main() {
fn filesystem_cache_should_work() -> Result<(), String> { fn filesystem_cache_should_work() -> Result<(), String> {
let wasmer_cache_dir = get_cache_dir(); let wasmer_cache_dir = get_cache_dir();
unsafe { unsafe { FileSystemCache::new(wasmer_cache_dir).map_err(|e| format!("Cache error: {:?}", e))? };
FileSystemCache::new(wasmer_cache_dir).map_err(|e| format!("Cache error: {:?}", e))?
};
Ok(()) Ok(())
} }