aboutsummaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs3
1 files changed, 2 insertions, 1 deletions
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<Box<dyn Stream<Item = Packet> + Send>>;
-pub type Packet = Result<Vec<u8>, u8>;
+pub type Packet = Result<Bytes, u8>;
/// Utility function: encodes any serializable value in MessagePack binary format
/// using the RMP library.