Skip to content

Commit

Permalink
build(deps): Update zerocopy requirement from 0.6.3 to 0.7.11 (#75)
Browse files Browse the repository at this point in the history
* build(deps): Update zerocopy requirement from 0.6.3 to 0.7.11

Updates the requirements on [zerocopy](https://github.com/google/zerocopy) to permit the latest version.
- [Commits](google/zerocopy@v0.6.3...v0.7.11)

---
updated-dependencies:
- dependency-name: zerocopy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use derive feature

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Richard Pringle <richard.pringle@avalabs.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Richard Pringle <richard.pringle@avalabs.org>
  • Loading branch information
dependabot[bot] and richardpringle authored Oct 24, 2023
1 parent 39ffa42 commit cf7ca64
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/avalanche-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spki = "0.7.2" # https://github.com/RustCrypto/formats/tree/master/spki
strum = "0.24.1"
thiserror = "1.0.47"
url = "2.4.0" # for "codec::serde::ip_port", "utils"
zerocopy = "0.6.3"
zerocopy = { version = "0.7.11", features = ["derive"] }
zeroize = "1.6.0" # for "BLS

# [OPTIONAL] for "libsecp256k1"
Expand Down
4 changes: 2 additions & 2 deletions crates/avalanche-types/src/ids/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::{
};
use lazy_static::lazy_static;
use serde::{self, de::Visitor, Deserialize, Deserializer, Serialize, Serializer};
use zerocopy::{AsBytes, FromBytes, Unaligned};
use zerocopy::{AsBytes, FromBytes, FromZeroes, Unaligned};

pub const LEN: usize = 32;

Expand All @@ -35,7 +35,7 @@ lazy_static! {

/// ref. <https://pkg.go.dev/github.com/ava-labs/avalanchego/ids#ID>
/// ref. <https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html#safety>
#[derive(Debug, Clone, Copy, Eq, AsBytes, FromBytes, Unaligned)]
#[derive(Debug, Clone, Copy, Eq, AsBytes, FromZeroes, FromBytes, Unaligned)]
#[repr(transparent)]
pub struct Id([u8; LEN]);

Expand Down
4 changes: 2 additions & 2 deletions crates/avalanche-types/src/ids/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::{

use lazy_static::lazy_static;
use serde::{self, de::Visitor, Deserialize, Deserializer, Serialize, Serializer};
use zerocopy::{AsBytes, FromBytes, Unaligned};
use zerocopy::{AsBytes, FromBytes, FromZeroes, Unaligned};

use crate::{formatting, hash, ids::short};

Expand All @@ -24,7 +24,7 @@ lazy_static! {

/// ref. <https://pkg.go.dev/github.com/ava-labs/avalanchego/ids#ShortID>
/// ref. <https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html#safety>
#[derive(Debug, Copy, Clone, Eq, AsBytes, FromBytes, Unaligned)]
#[derive(Debug, Copy, Clone, Eq, AsBytes, FromZeroes, FromBytes, Unaligned)]
#[repr(transparent)]
pub struct Id([u8; LEN]);

Expand Down
4 changes: 2 additions & 2 deletions crates/avalanche-types/src/ids/short.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{
use crate::{formatting, hash, key::secp256k1};
use lazy_static::lazy_static;
use serde::{self, Deserialize, Deserializer, Serialize, Serializer};
use zerocopy::{AsBytes, FromBytes, Unaligned};
use zerocopy::{AsBytes, FromBytes, FromZeroes, Unaligned};

pub const LEN: usize = 20;

Expand All @@ -20,7 +20,7 @@ lazy_static! {

/// ref. <https://pkg.go.dev/github.com/ava-labs/avalanchego/ids#ShortID>
/// ref. <https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html#safety>
#[derive(Debug, Clone, Eq, AsBytes, FromBytes, Unaligned)]
#[derive(Debug, Clone, Eq, AsBytes, FromZeroes, FromBytes, Unaligned)]
#[repr(transparent)]
pub struct Id([u8; LEN]);

Expand Down

0 comments on commit cf7ca64

Please sign in to comment.