summaryrefslogtreecommitdiff
path: root/crates/types
diff options
context:
space:
mode:
Diffstat (limited to 'crates/types')
-rw-r--r--crates/types/Cargo.toml4
-rw-r--r--crates/types/src/archive.rs1
-rw-r--r--crates/types/src/lib.rs4
3 files changed, 4 insertions, 5 deletions
diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml
index b986c2a..5efcb8b 100644
--- a/crates/types/Cargo.toml
+++ b/crates/types/Cargo.toml
@@ -16,8 +16,8 @@ postcard={version="1.1", optional=true, default-features=false, features=["alloc
serde={version="1.0", optional=true, default-features=false, features=["alloc"]}
[features]
-default=["std", "logging", "archive"]
+default=["std", "log", "archive"]
std=["serde?/std"]
archive=["dep:postcard", "dep:serde"]
-logging=["dep:log"]
+log=["dep:log"]
diff --git a/crates/types/src/archive.rs b/crates/types/src/archive.rs
index 7d52049..069addf 100644
--- a/crates/types/src/archive.rs
+++ b/crates/types/src/archive.rs
@@ -51,7 +51,6 @@ impl TinyWasmModule {
/// Creates a `TinyWasmModule` from a slice of bytes.
pub fn from_twasm(wasm: &[u8]) -> Result<Self, TwasmError> {
let len = validate_magic(wasm)?;
-
postcard::from_bytes(&wasm[len..]).map_err(TwasmError::InvalidArchive)
}
diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs
index c34b705..beaa828 100644
--- a/crates/types/src/lib.rs
+++ b/crates/types/src/lib.rs
@@ -21,12 +21,12 @@ const fn max_page_count(page_size: u64) -> u64 {
}
// log for logging (optional).
-#[cfg(feature = "logging")]
+#[cfg(feature = "log")]
#[allow(clippy::single_component_path_imports, unused_imports)]
use log;
// noop fallback if logging is disabled.
-#[cfg(not(feature = "logging"))]
+#[cfg(not(feature = "log"))]
#[allow(unused_imports, unused_macros)]
pub(crate) mod log {
macro_rules! debug ( ($($tt:tt)*) => {{}} );