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:
@@ -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:?}"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user