aboutsummaryrefslogtreecommitdiff
path: root/common/object/src/value.rs
diff options
context:
space:
mode:
Diffstat (limited to 'common/object/src/value.rs')
-rw-r--r--common/object/src/value.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/object/src/value.rs b/common/object/src/value.rs
index ac4cc9d..817ccdc 100644
--- a/common/object/src/value.rs
+++ b/common/object/src/value.rs
@@ -10,11 +10,11 @@ pub trait Value<'a>: ValueStore + Sized {
const ALIGNED: bool;
fn load_aligned(buf: &'a [u32]) -> Option<Self> {
let _ = buf;
- None
+ unimplemented!()
}
fn load_unaligned(buf: &'a [u8]) -> Option<Self> {
let _ = buf;
- None
+ unimplemented!()
}
}
pub trait ValueStore {
@@ -75,7 +75,7 @@ impl ValueStore for Tag {
}
}
impl Value<'_> for u64 {
- const ALIGNED: bool = false;
+ const ALIGNED: bool = true;
fn load_aligned(buf: &[u32]) -> Option<Self> {
let hi = u32::from_be(*buf.get(0)?) as u64;
let lo = u32::from_be(*buf.get(1)?) as u64;
@@ -95,7 +95,7 @@ impl ValueStore for u64 {
}
}
impl Value<'_> for f64 {
- const ALIGNED: bool = false;
+ const ALIGNED: bool = true;
fn load_aligned(buf: &[u32]) -> Option<Self> {
u32::load_aligned(buf).map(|x| x as f64)
}
@@ -112,7 +112,7 @@ impl ValueStore for f64 {
}
}
impl Value<'_> for i64 {
- const ALIGNED: bool = false;
+ const ALIGNED: bool = true;
fn load_aligned(buf: &[u32]) -> Option<Self> {
u32::load_aligned(buf).map(|x| x as i64)
}