From 8861355fa9d9ecc5aed742729d71b70aaea6a4e1 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 7 May 2024 13:36:39 +0200 Subject: [PATCH] implement Send on encoder and decoder wrappers Make API more convenient to use. --- src/decoder.rs | 2 ++ src/encoder.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/decoder.rs b/src/decoder.rs index a6800b4..71dff97 100644 --- a/src/decoder.rs +++ b/src/decoder.rs @@ -185,6 +185,8 @@ struct DecoderWrapper { options: Pin>, } +unsafe impl Send for DecoderWrapper {} + impl DecoderWrapper { pub fn new( data: Pin>, diff --git a/src/encoder.rs b/src/encoder.rs index 369ee23..85b092c 100644 --- a/src/encoder.rs +++ b/src/encoder.rs @@ -279,6 +279,8 @@ struct EncoderWrapper { options: Pin>, } +unsafe impl Send for EncoderWrapper {} + impl EncoderWrapper { pub fn new( dimensions: (u32, u32),