Update to 2025.
This commit is contained in:
1 parent
0f20533eaa
commit
bc2f18f2c0
3 files changed
+1714
-847
No files matched your search
Generated
+1712
-842
File diff suppressed because it is too large.
Load diff
+1
-4
@@ -7,9 +7,6 @@ async fn main() {
|
||||
let replies = session.get("name").await.unwrap();
|
||||
while let Ok(reply) = replies.recv_async().await {
|
||||
let result = reply.result().unwrap();
|
||||
println!(
|
||||
"Got: {:?}",
|
||||
result.payload().deserialize::<String>().unwrap()
|
||||
);
|
||||
println!("Got: {:?}", result.payload().try_to_string().unwrap());
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -20,7 +20,7 @@ impl Message {
|
||||
// Go from a sample to a message and print it.
|
||||
pub fn print_message(sample: &zenoh::sample::Sample) {
|
||||
let payload = sample.payload();
|
||||
let bytes: Vec<u8> = payload.into();
|
||||
let bytes = payload.to_bytes();
|
||||
let message: Message = ciborium::from_reader(&bytes[..]).unwrap();
|
||||
|
||||
println!(
|
||||
|
||||
Reference in new issue
Block a user