Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Sep 29, 2024
1 parent ba934f8 commit cf37dd6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
13 changes: 10 additions & 3 deletions examples/examples/z_bytes.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//
// Copyright (c) 2024 ZettaScale Technology
//
Expand All @@ -12,8 +11,16 @@
// Contributors:
// ZettaScale Zenoh Team, <[email protected]>
//
use zenoh::{bytes::{Encoding, ZBytes}, time::{Timestamp, TimestampId}};
use std::{collections::HashMap, str::FromStr, time::{SystemTime, UNIX_EPOCH}};
use std::{
collections::HashMap,
str::FromStr,
time::{SystemTime, UNIX_EPOCH},
};

use zenoh::{
bytes::{Encoding, ZBytes},
time::{Timestamp, TimestampId},
};

fn main() {
// Raw bytes
Expand Down
10 changes: 7 additions & 3 deletions zenoh-ext/src/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ use std::{
io::{Read, Write},
marker::PhantomData,
ops::{Deref, DerefMut},
ptr, str::FromStr,
ptr,
str::FromStr,
};

use zenoh::{bytes::{Encoding, ZBytes, ZBytesReader, ZBytesWriter}, time::{Timestamp, TimestampId, NTP64}};
use zenoh::{
bytes::{Encoding, ZBytes, ZBytesReader, ZBytesWriter},
time::{Timestamp, TimestampId, NTP64},
};

#[derive(Debug)]
pub struct ZDeserializeError;
Expand Down Expand Up @@ -502,7 +506,7 @@ impl Deserialize for TimestampId {
impl Serialize for Timestamp {
fn serialize(&self, serializer: &mut ZSerializer) {
self.get_time().serialize(serializer);
self.get_id().serialize(serializer);
self.get_id().serialize(serializer);
}
}

Expand Down

0 comments on commit cf37dd6

Please sign in to comment.