From 98b20d92406ae5ac8f588ebc6acf39533cb39c69 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Mon, 29 Jul 2019 18:29:20 -0700 Subject: [PATCH] Fixed Caching in Windows lint and improved code --- lib/runtime-core/src/cache.rs | 2 -- lib/runtime/src/cache.rs | 2 +- src/bin/wasmer.rs | 5 ++--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/runtime-core/src/cache.rs b/lib/runtime-core/src/cache.rs index 6b63e77b3..57f36e7ea 100644 --- a/lib/runtime-core/src/cache.rs +++ b/lib/runtime-core/src/cache.rs @@ -241,5 +241,3 @@ pub trait Cache { /// A unique ID generated from the version of Wasmer for use with cache versioning pub const WASMER_VERSION_HASH: &'static str = include_str!(concat!(env!("OUT_DIR"), "/wasmer_version_hash.txt")); - -pub const WASMER_VERSION: &'static str = env!("CARGO_PKG_VERSION"); diff --git a/lib/runtime/src/cache.rs b/lib/runtime/src/cache.rs index 620ccaf58..8fd5219a1 100644 --- a/lib/runtime/src/cache.rs +++ b/lib/runtime/src/cache.rs @@ -9,7 +9,7 @@ use std::{ use wasmer_runtime_core::cache::Error as CacheError; pub use wasmer_runtime_core::{ backend::Backend, - cache::{Artifact, Cache, WasmHash, WASMER_VERSION}, + cache::{Artifact, Cache, WasmHash}, }; /// Representation of a directory that contains compiled wasm artifacts. diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index 0f013a4d0..cbb5d96cb 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -818,8 +818,7 @@ fn main() { fn filesystem_cache_should_work() -> Result<(), String> { let wasmer_cache_dir = get_cache_dir(); - unsafe { - FileSystemCache::new(wasmer_cache_dir).map_err(|e| format!("Cache error: {:?}", e))? - }; + unsafe { FileSystemCache::new(wasmer_cache_dir).map_err(|e| format!("Cache error: {:?}", e))? }; + Ok(()) }