Show More
@@ -141,7 +141,7 impl Default for CompressionConfig { | |||||
141 |
|
141 | |||
142 | /// A high-level trait to define compressors that should be able to compress |
|
142 | /// A high-level trait to define compressors that should be able to compress | |
143 | /// and decompress arbitrary bytes. |
|
143 | /// and decompress arbitrary bytes. | |
144 | pub trait Compressor { |
|
144 | pub trait Compressor: Send { | |
145 | /// Returns a new [`Vec`] with the compressed data. |
|
145 | /// Returns a new [`Vec`] with the compressed data. | |
146 | /// Should return `Ok(None)` if compression does not apply (e.g. too small) |
|
146 | /// Should return `Ok(None)` if compression does not apply (e.g. too small) | |
147 | fn compress( |
|
147 | fn compress( |
@@ -75,7 +75,7 pub struct InnerRevlog { | |||||
75 | /// The [`Compressor`] that this revlog uses by default to compress data. |
|
75 | /// The [`Compressor`] that this revlog uses by default to compress data. | |
76 | /// This does not mean that this revlog uses this compressor for reading |
|
76 | /// This does not mean that this revlog uses this compressor for reading | |
77 | /// data, as different revisions may have different compression modes. |
|
77 | /// data, as different revisions may have different compression modes. | |
78 |
compressor: Mutex<Box<dyn Compressor |
|
78 | compressor: Mutex<Box<dyn Compressor>>, | |
79 | } |
|
79 | } | |
80 |
|
80 | |||
81 | impl InnerRevlog { |
|
81 | impl InnerRevlog { |
General Comments 0
You need to be logged in to leave comments.
Login now