Migrate serialization from Bincode to Postcard

- Replaced Bincode with Postcard for serialization/deserialization across configs and save operations.
- Simplified struct derives by removing `bincode`-specific traits.
- Updated `Cargo.toml` and `Cargo.lock` to include `postcard` and dependencies.
- Added padding stripping for deserialization and improved error handling.
- Adjusted serialization logic in `savegame_manager.rs` and related modules.
This commit is contained in:
2026-04-26 20:46:52 +02:00
parent 097aff5360
commit f1c85d1d74
10 changed files with 91 additions and 38 deletions

View File

@@ -230,16 +230,8 @@ impl<E: fmt::Debug> From<ExpanderError<I2cDeviceError<E>>> for FatError {
}
}
impl From<bincode::error::DecodeError> for FatError {
fn from(value: bincode::error::DecodeError) -> Self {
FatError::Eeprom24x {
error: format!("{value:?}"),
}
}
}
impl From<bincode::error::EncodeError> for FatError {
fn from(value: bincode::error::EncodeError) -> Self {
impl From<postcard::Error> for FatError {
fn from(value: postcard::Error) -> Self {
FatError::Eeprom24x {
error: format!("{value:?}"),
}