aboutsummaryrefslogtreecommitdiff
path: root/src/frame/mod.rs
diff options
context:
space:
mode:
authorMax Audron <me@audron.dev>2026-02-22 14:06:16 +0100
committerMax Audron <me@audron.dev>2026-02-22 14:06:16 +0100
commit024eb3df4a0786a92033baea123aa779998cdc28 (patch)
tree412670a982455cb3351c199b7df21b0b22f3a36e /src/frame/mod.rs
parentSyncable trait error handling (diff)
NetworkList and signalproxy objects error handling
Diffstat (limited to 'src/frame/mod.rs')
-rw-r--r--src/frame/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/frame/mod.rs b/src/frame/mod.rs
index 1c2f859..75d57ff 100644
--- a/src/frame/mod.rs
+++ b/src/frame/mod.rs
@@ -162,7 +162,7 @@ impl Decoder for QuasselCodec {
let after_in = self.decomp.total_in();
let after_out = self.decomp.total_out();
- let len = (after_out - before_out).try_into().unwrap();
+ let len = (after_out - before_out).try_into()?;
// Reserve length of uncompressed stream
// and put bytes into there
@@ -233,7 +233,7 @@ impl Encoder<Vec<u8>> for QuasselCodec {
let after_in = self.comp.total_in();
let after_out = self.comp.total_out();
- cbuf.truncate((after_out - before_out).try_into().unwrap());
+ cbuf.truncate((after_out - before_out).try_into()?);
*dst = BytesMut::from(&cbuf[..]);
} else {
*dst = buf.clone();