From 05e380d017cb4d6e633d75de5aac59b246b388a8 Mon Sep 17 00:00:00 2001 From: Liam Kinne Date: Mon, 18 Mar 2024 23:08:58 +1000 Subject: [PATCH 1/2] update to 0.7 --- tlvc/Cargo.toml | 2 +- tlvc/src/lib.rs | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tlvc/Cargo.toml b/tlvc/Cargo.toml index 3a2ff58..caefbe2 100644 --- a/tlvc/Cargo.toml +++ b/tlvc/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] crc = "3.0" -zerocopy = "0.6" +zerocopy = { version = "0.7", features = ["derive"] } byteorder = {version = "1.4", default-features = false} [features] diff --git a/tlvc/src/lib.rs b/tlvc/src/lib.rs index 00b64d5..bc742d1 100644 --- a/tlvc/src/lib.rs +++ b/tlvc/src/lib.rs @@ -7,7 +7,7 @@ #![cfg_attr(not(test), no_std)] use core::mem::size_of; -use zerocopy::{AsBytes, FromBytes}; +use zerocopy::{AsBytes, FromBytes, FromZeroes}; /// Shorthand type for little-endian `u32` used in the chunk header. pub type U32LE = zerocopy::U32; @@ -28,7 +28,14 @@ pub const fn header_checksum(tag: [u8; 4], len: u32) -> u32 { /// _don't_ require them to be aligned in local memory, so this uses the /// unaligned and explicitly little-endian version of `u32`. #[derive( - Copy, Clone, Debug, Default, AsBytes, FromBytes, zerocopy::Unaligned, + Copy, + Clone, + Debug, + Default, + AsBytes, + FromZeroes, + FromBytes, + zerocopy::Unaligned, )] #[repr(C)] pub struct ChunkHeader { From 27f0f4a91111235f1f51f9aecbe6eca472139f3f Mon Sep 17 00:00:00 2001 From: Liam Kinne Date: Mon, 18 Mar 2024 23:11:43 +1000 Subject: [PATCH 2/2] update to 0.7 --- text/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/Cargo.toml b/text/Cargo.toml index bf03b39..b5c3ca9 100644 --- a/text/Cargo.toml +++ b/text/Cargo.toml @@ -9,4 +9,4 @@ edition = "2021" serde = {version = "1", features = ["derive"]} ron = "0.8" tlvc = {path = "../tlvc"} -zerocopy = "0.6" +zerocopy = "0.7"