Update to 2025.
This commit is contained in:
parent
0f20533eaa
commit
bc2f18f2c0
File diff suppressed because it is too large
Load Diff
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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!(
|
||||
|
|
|
|||
Loading…
Reference in New Issue