From ef8ea24cf355511a19bc339f591985e7e2b9c733 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 30 Dec 2025 08:53:25 +0100 Subject: [PATCH] Replace bincode with bincode_next --- central_backend/Cargo.lock | 32 +++++++++---------- central_backend/Cargo.toml | 2 +- .../src/energy/consumption_history_file.rs | 6 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/central_backend/Cargo.lock b/central_backend/Cargo.lock index 9397608..3191491 100644 --- a/central_backend/Cargo.lock +++ b/central_backend/Cargo.lock @@ -536,23 +536,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e050f626429857a27ddccb31e0aca21356bfa709c04041aefddac081a8f068a" [[package]] -name = "bincode" -version = "2.0.1" +name = "bincode-next" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" +checksum = "6a347d3b94606a7b3d588fe1ff7f41996bbb3690ade4e79935b26565af10e03f" dependencies = [ - "bincode_derive", + "bincode_derive-next", "serde", - "unty", + "unty-next", ] [[package]] -name = "bincode_derive" -version = "2.0.1" +name = "bincode_derive-next" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" +checksum = "197e777c78cc9fbe8396cf82e18f84bb6026b8ec534ebb3097f4d98894e8b540" dependencies = [ - "virtue", + "virtue-next", ] [[package]] @@ -646,7 +646,7 @@ dependencies = [ "actix-web", "anyhow", "asn1", - "bincode", + "bincode-next", "chrono", "clap", "dotenvy", @@ -3454,10 +3454,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] -name = "unty" -version = "0.0.4" +name = "unty-next" +version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" +checksum = "169ea32c8f5801e4b397f08d2b5d3d0d3675d11c241aad7338b601beed52a291" [[package]] name = "url" @@ -3508,10 +3508,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "virtue" -version = "0.0.18" +name = "virtue-next" +version = "0.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" +checksum = "c4daab4b8a8c3c1408ea5e60a5d380790ff15d0cfe0333c14ce98210c1339fd8" [[package]] name = "walkdir" diff --git a/central_backend/Cargo.toml b/central_backend/Cargo.toml index 98634c3..a6ecf81 100644 --- a/central_backend/Cargo.toml +++ b/central_backend/Cargo.toml @@ -40,7 +40,7 @@ jsonwebtoken = { version = "10.2.0", features = ["use_pem", "rust_crypto"] } prettytable-rs = "0.10.0" chrono = "0.4.42" serde_yml = "0.0.12" -bincode = "2.0.1" +bincode-next = "2.0.4" fs4 = { version = "0.13.1", features = ["sync"] } zip = { version = "6.0.0", features = ["bzip2"] } walkdir = "2.5.0" diff --git a/central_backend/src/energy/consumption_history_file.rs b/central_backend/src/energy/consumption_history_file.rs index 97f1475..93b95b9 100644 --- a/central_backend/src/energy/consumption_history_file.rs +++ b/central_backend/src/energy/consumption_history_file.rs @@ -29,9 +29,9 @@ impl ConsumptionHistoryFile { if path.exists() { Ok(Self { day, - buff: bincode::decode_from_slice( + buff: bincode_next::decode_from_slice( &std::fs::read(path)?, - bincode::config::standard(), + bincode_next::config::standard(), )? .0, r#type, @@ -94,7 +94,7 @@ impl ConsumptionHistoryFile { let path = AppConfig::get().energy_consumption_history_day(self.day, self.r#type); std::fs::write( path, - bincode::encode_to_vec(&self.buff, bincode::config::standard())?, + bincode_next::encode_to_vec(&self.buff, bincode_next::config::standard())?, )?; Ok(()) }