Skip to content

Commit

Permalink
clippy & fmt & update changelog/ readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Boog900 committed Jan 15, 2024
1 parent a39abc3 commit aafe4ba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Add `container_as_blob` ([#63](https://github.com/monero-rs/monero-epee-bin-serde/pull/63))
- Allow optional values ([#59](https://github.com/monero-rs/monero-epee-bin-serde/pull/59))
- Updated Rust version to 2021 and bumped MSRV to 1.63 ([#52](https://github.com/monero-rs/monero-epee-bin-serde/pull/52)).

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ serde_bytes = { version = "0.11", optional = true }
hex = "0.4"
hex-literal = "0.4"
monero = "0.19"
rand = "0.8"
serde = { version = "1", features = ["derive"] }
serde_with = "3"
rand = "0.8"
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ This crate implements the binary encoding defined in the `epee` helper library o
[0]: https://github.com/monero-project/monero/blob/0a1ddc2eff854f3e932203a95b65a9f1efd60eef/contrib/epee/include/storages/portable_storage_from_bin.h
[1]: https://github.com/monero-project/monero/blob/0a1ddc2eff854f3e932203a95b65a9f1efd60eef/contrib/epee/include/storages/portable_storage_to_bin.h

## Regressions

Due to limitations of `serde` and weirdness in `epee` you need to wrap containers like `Vec` in `#[serde(default = "Vec::new")]` and
optionally you can add `#[serde(skip_serializing_if = "Vec::is_empty")]` as `epee` does not serialize the first field of an array.

## License

Licensed under either of
Expand Down
2 changes: 1 addition & 1 deletion src/container_as_blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ mod tests {

let bytes = to_bytes(&t).unwrap();

let tt = from_bytes(&bytes).unwrap();
let tt = from_bytes(bytes).unwrap();

assert_eq!(t, tt);
}
Expand Down

0 comments on commit aafe4ba

Please sign in to comment.