Skip to content

Commit 9d393df

Browse files
build(deps): update zerocopy requirement from 0.6 to 0.7 (#1939)
* build(deps): update zerocopy requirement from 0.6 to 0.7 Updates the requirements on [zerocopy](https://github.com/google/zerocopy) to permit the latest version. - [Commits](google/zerocopy@v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: zerocopy dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * update derive usage --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cameron Bytheway <[email protected]>
1 parent c5e7f76 commit 9d393df

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

common/s2n-codec/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ generator = ["bolero-generator"]
2222
bolero-generator = { version = "0.10", default-features = false, optional = true }
2323
byteorder = { version = "1.1", default-features = false }
2424
bytes = { version = "1", default-features = false, optional = true }
25-
zerocopy = "0.6"
26-
zerocopy-derive = "0.6"
25+
zerocopy = { version = "0.7", features = ["derive"] }

common/s2n-codec/src/zerocopy.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ macro_rules! zerocopy_network_integer {
183183
Default,
184184
Eq,
185185
$crate::zerocopy::FromBytes,
186+
$crate::zerocopy::FromZeroes,
186187
$crate::zerocopy::AsBytes,
187188
$crate::zerocopy::Unaligned,
188189
)]
@@ -321,7 +322,9 @@ zerocopy_network_integer!(u128, U128);
321322
fn zerocopy_struct_test() {
322323
use crate::DecoderBuffer;
323324

324-
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd, FromBytes, AsBytes, Unaligned)]
325+
#[derive(
326+
Copy, Clone, Debug, PartialEq, PartialOrd, FromZeroes, FromBytes, AsBytes, Unaligned,
327+
)]
325328
#[repr(C)]
326329
struct UdpHeader {
327330
source_port: U16,

quic/s2n-quic-core/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ pin-project-lite = { version = "0.2" }
3737
s2n-codec = { version = "=0.31.0", path = "../../common/s2n-codec", default-features = false }
3838
subtle = { version = "2", default-features = false }
3939
tracing = { version = "0.1", default-features = false, optional = true }
40-
zerocopy = "0.6"
41-
zerocopy-derive = "0.6"
40+
zerocopy = { version = "0.7", features = ["derive"] }
4241
futures-test = { version = "0.3", optional = true } # For testing Waker interactions
4342
once_cell = { version = "1", optional = true }
4443

quic/s2n-quic-core/src/crypto/tls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#[cfg(feature = "alloc")]
55
pub use bytes::{Bytes, BytesMut};
66
use core::{convert::TryFrom, fmt::Debug};
7-
use zerocopy::{AsBytes, FromBytes, Unaligned};
7+
use zerocopy::{AsBytes, FromBytes, FromZeroes, Unaligned};
88

99
#[cfg(any(test, feature = "testing"))]
1010
pub mod testing;
@@ -328,7 +328,7 @@ handshake_type!(
328328
//# case finished: Finished;
329329
//# } body;
330330
//# } Handshake;
331-
#[derive(Clone, Copy, Debug, AsBytes, FromBytes, Unaligned)]
331+
#[derive(Clone, Copy, Debug, AsBytes, FromBytes, FromZeroes, Unaligned)]
332332
#[repr(C)]
333333
pub struct HandshakeHeader {
334334
msg_type: u8,

quic/s2n-quic-core/src/inet/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ macro_rules! define_inet_type {
1212
#[cfg(any(test, feature = "generator"))]
1313
use bolero_generator::*;
1414

15-
#[derive(Clone, Copy, Default, Eq, PartialEq, PartialOrd, Ord, zerocopy::FromBytes, zerocopy::AsBytes, zerocopy::Unaligned)]
15+
#[derive(Clone, Copy, Default, Eq, PartialEq, PartialOrd, Ord, zerocopy::FromZeroes, zerocopy::FromBytes, zerocopy::AsBytes, zerocopy::Unaligned)]
1616
#[cfg_attr(any(test, feature = "generator"), derive(bolero_generator::TypeGenerator))]
1717
#[cfg_attr(kani, derive(kani::Arbitrary))]
1818
#[repr(C)]

quic/s2n-quic/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ provider-address-token-default = [
2121
"hash_hasher",
2222
"s2n-quic-crypto",
2323
"zerocopy",
24-
"zerocopy-derive",
2524
"zeroize",
2625
]
2726
provider-event-console-perf = [
@@ -71,8 +70,7 @@ s2n-quic-tls = { version = "=0.31.0", path = "../s2n-quic-tls", optional = true
7170
s2n-quic-tls-default = { version = "=0.31.0", path = "../s2n-quic-tls-default", optional = true }
7271
s2n-quic-transport = { version = "=0.31.0", path = "../s2n-quic-transport" }
7372
tokio = { version = "1", default-features = false }
74-
zerocopy = { version = "0.6", optional = true }
75-
zerocopy-derive = { version = "0.6", optional = true }
73+
zerocopy = { version = "0.7", optional = true, features = ["derive"] }
7674
zeroize = { version = "1", optional = true, default-features = false }
7775

7876
[dev-dependencies]

quic/s2n-quic/src/provider/address_token/default.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use s2n_quic_core::{
1616
};
1717
use s2n_quic_crypto::{constant_time, digest, hmac};
1818
use std::hash::{Hash, Hasher};
19-
use zerocopy::{AsBytes, FromBytes, Unaligned};
19+
use zerocopy::{AsBytes, FromBytes, FromZeroes, Unaligned};
2020
use zeroize::Zeroizing;
2121

2222
struct BaseKey {
@@ -355,7 +355,7 @@ impl super::Format for Format {
355355
}
356356
}
357357

358-
#[derive(Clone, Copy, Debug, FromBytes, AsBytes, Unaligned)]
358+
#[derive(Clone, Copy, Debug, FromBytes, FromZeroes, AsBytes, Unaligned)]
359359
#[repr(C)]
360360
pub(crate) struct Header(u8);
361361

@@ -415,7 +415,7 @@ impl Header {
415415
//= https://www.rfc-editor.org/rfc/rfc9000#section-8.1.4
416416
//# There is no need for a single well-defined format for the token
417417
//# because the server that generates the token also consumes it.
418-
#[derive(Copy, Clone, Debug, FromBytes, AsBytes, Unaligned)]
418+
#[derive(Copy, Clone, Debug, FromBytes, FromZeroes, AsBytes, Unaligned)]
419419
#[repr(C)]
420420
struct Token {
421421
header: Header,

0 commit comments

Comments
 (0)