aboutsummaryrefslogtreecommitdiff
path: root/common/object/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-02-18 16:37:41 +0100
committermetamuffin <metamuffin@disroot.org>2026-02-18 16:37:41 +0100
commit9c9ded0eea1dd5e18151434c96715b7def9c0fd2 (patch)
treee55d533b4e311589b5a8873d6b1bf2411e999731 /common/object/src/lib.rs
parent70169924b611b9b68587bd9169f991e3770b7dc7 (diff)
downloadjellything-9c9ded0eea1dd5e18151434c96715b7def9c0fd2.tar
jellything-9c9ded0eea1dd5e18151434c96715b7def9c0fd2.tar.bz2
jellything-9c9ded0eea1dd5e18151434c96715b7def9c0fd2.tar.zst
store tags in str byte order
Diffstat (limited to 'common/object/src/lib.rs')
-rw-r--r--common/object/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/object/src/lib.rs b/common/object/src/lib.rs
index bd00639..b197932 100644
--- a/common/object/src/lib.rs
+++ b/common/object/src/lib.rs
@@ -28,12 +28,12 @@ pub struct Tag(pub u32);
impl Tag {
pub const fn new(fourcc: &[u8; 4]) -> Self {
- Self(u32::from_be_bytes(*fourcc))
+ Self(u32::from_le_bytes(*fourcc))
}
}
impl Display for Tag {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.write_str(str::from_utf8(&self.0.to_be_bytes()).unwrap())
+ f.write_str(str::from_utf8(&self.0.to_le_bytes()).unwrap())
}
}
@@ -219,7 +219,7 @@ impl<'a> Object<'a> {
.iter()
.all(|rhs| rhs.as_object().get(ident) != val.as_object().get(ident))
{
- any_new = false;
+ any_new = true;
new_vals.push(val);
}
}