Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
surban committed Jul 14, 2024
1 parent ca7153c commit b4bb43e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,14 @@
"structs",
"unbuffered",
"untrusted"
],
"rust-analyzer.cargo.features": [
"full",
"default-codec-json",
"codec-bincode",
"codec-ciborium",
"codec-json",
"codec-message-pack",
"codec-postcard"
]
}
2 changes: 1 addition & 1 deletion remoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ full-codecs = [
remoc_macro = { version = "=0.13.0", path = "../remoc_macro", optional = true }

futures = "0.3"
tokio = { version = "1.34.0", features = ["macros", "rt", "sync", "time"] }
tokio = { version = "1.34", features = ["macros", "rt", "sync", "time"] }
tokio-util = { version = "0.7", features = ["codec"] }
rand = "0.8"
tracing = "0.1.29"
Expand Down
2 changes: 1 addition & 1 deletion remoc/src/codec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ pub use message_pack::MessagePack as Default;
#[cfg(feature = "codec-postcard")]
mod postcard;
#[cfg(feature = "codec-postcard")]
pub use postcard::*;
pub use postcard::Postcard;
#[cfg(feature = "default-codec-postcard")]
#[doc(no_inline)]
pub use postcard::Postcard as Default;
Expand Down
4 changes: 1 addition & 3 deletions remoc/src/codec/postcard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use serde::{Deserialize, Serialize};

use super::{Codec, DeserializationError, SerializationError};



/// Postcard codec.
///
/// See [postcard] for details.
Expand Down Expand Up @@ -31,7 +29,7 @@ impl Codec for Postcard {
{
let mut bytes = vec![];
reader.read_to_end(&mut bytes).map_err(DeserializationError::new)?;

let item = postcard::from_bytes(&bytes).map_err(DeserializationError::new)?;
Ok(item)
}
Expand Down
2 changes: 1 addition & 1 deletion remoc/tests/codec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ fn message_pack() {
#[test]
fn postcard() {
roundtrip::<TestStruct, codec::Postcard>()
}
}

0 comments on commit b4bb43e

Please sign in to comment.