From 26989bba1409bfc093e58ef98e75885b10ad7c1c Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 21 Jul 2022 18:15:07 +0200 Subject: Use Bytes instead of Vec --- src/util.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/util.rs') diff --git a/src/util.rs b/src/util.rs index 6fbafe6..e81a89c 100644 --- a/src/util.rs +++ b/src/util.rs @@ -4,6 +4,7 @@ use std::pin::Pin; use log::info; use serde::Serialize; +use bytes::Bytes; use futures::Stream; use tokio::sync::watch; @@ -27,7 +28,7 @@ pub type NetworkKey = sodiumoxide::crypto::auth::Key; /// meaning, it's up to your application to define their semantic. pub type ByteStream = Pin + Send>>; -pub type Packet = Result, u8>; +pub type Packet = Result; /// Utility function: encodes any serializable value in MessagePack binary format /// using the RMP library. -- cgit v1.2.3