# HG changeset patch # User Raphaël Gomès # Date 1730724216 -3600 # Node ID f69a3f55fa9b8dc98dc28a7b97c7993834b54afe # Parent 7756494c5ecd3db3e8bdae1a7f5dc48106bfae3c rust-compression: move the `Send` bound to the `Compressor` trait All compressors should be `Send`, might as well make any future use easier. diff -r 7756494c5ecd -r f69a3f55fa9b rust/hg-core/src/revlog/compression.rs --- a/rust/hg-core/src/revlog/compression.rs Mon Nov 04 12:10:22 2024 +0100 +++ b/rust/hg-core/src/revlog/compression.rs Mon Nov 04 13:43:36 2024 +0100 @@ -141,7 +141,7 @@ /// A high-level trait to define compressors that should be able to compress /// and decompress arbitrary bytes. -pub trait Compressor { +pub trait Compressor: Send { /// Returns a new [`Vec`] with the compressed data. /// Should return `Ok(None)` if compression does not apply (e.g. too small) fn compress( diff -r 7756494c5ecd -r f69a3f55fa9b rust/hg-core/src/revlog/inner_revlog.rs --- a/rust/hg-core/src/revlog/inner_revlog.rs Mon Nov 04 12:10:22 2024 +0100 +++ b/rust/hg-core/src/revlog/inner_revlog.rs Mon Nov 04 13:43:36 2024 +0100 @@ -75,7 +75,7 @@ /// The [`Compressor`] that this revlog uses by default to compress data. /// This does not mean that this revlog uses this compressor for reading /// data, as different revisions may have different compression modes. - compressor: Mutex>, + compressor: Mutex>, } impl InnerRevlog {