From 4dc4aa582b22334b0d8ad699370add6c369b0a34 Mon Sep 17 00:00:00 2001 From: matt rice Date: Wed, 15 Jul 2026 21:14:44 -0700 Subject: [PATCH] Since bincode is unmaintained use wincode instead. --- Cargo.toml | 5 ++++- src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7a480f6..1643990 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,10 @@ categories = ["data-structures"] [dependencies] num-traits = "0.2" serde = { version="1.0", features=["derive"], optional=true } -bincode = { version="2.0", features=["derive"], optional=true } +wincode = { version="0.5.5", features=["derive"], optional=true } [dev-dependencies] rand = "0.3" + +[features] +bincode = ["dep:wincode"] diff --git a/src/lib.rs b/src/lib.rs index ecbfef9..c78139c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ extern crate serde; #[cfg(feature = "bincode")] #[macro_use] -extern crate bincode; +extern crate wincode; use num_traits::{cast::FromPrimitive, AsPrimitive, PrimInt, ToPrimitive, Unsigned}; use std::{ @@ -55,7 +55,7 @@ use std::{ /// superior. #[derive(Clone, Debug)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "bincode", derive(Encode, Decode))] +#[cfg_attr(feature = "bincode", derive(SchemaRead, SchemaWrite))] pub struct PackedVec { len: usize, bits: Vec,