From cf37dd653c9b25ba485b107976604898653b3b6b Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Sun, 29 Sep 2024 22:01:05 +0200 Subject: [PATCH] cargo fmt --- examples/examples/z_bytes.rs | 13 ++++++++++--- zenoh-ext/src/serialization.rs | 10 +++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/examples/examples/z_bytes.rs b/examples/examples/z_bytes.rs index 27b40bc6e..808a8a2ec 100644 --- a/examples/examples/z_bytes.rs +++ b/examples/examples/z_bytes.rs @@ -1,4 +1,3 @@ - // // Copyright (c) 2024 ZettaScale Technology // @@ -12,8 +11,16 @@ // Contributors: // ZettaScale Zenoh Team, // -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 diff --git a/zenoh-ext/src/serialization.rs b/zenoh-ext/src/serialization.rs index f0dc67283..04b30a597 100644 --- a/zenoh-ext/src/serialization.rs +++ b/zenoh-ext/src/serialization.rs @@ -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; @@ -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); } }