Replace bincode with bincode_next
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user