Show More
@@ -85,7 +85,7 b' impl IndexHeader {' | |||||
85 | /// happened. This makes it transparent for the callers. |
|
85 | /// happened. This makes it transparent for the callers. | |
86 | struct IndexData { |
|
86 | struct IndexData { | |
87 | /// Immutable bytes, most likely taken from disk |
|
87 | /// Immutable bytes, most likely taken from disk | |
88 | bytes: Box<dyn Deref<Target = [u8]> + Send>, |
|
88 | bytes: Box<dyn Deref<Target = [u8]> + Send + Sync>, | |
89 | /// Used when stripping index contents, keeps track of the start of the |
|
89 | /// Used when stripping index contents, keeps track of the start of the | |
90 | /// first stripped revision, which is used to give a slice of the |
|
90 | /// first stripped revision, which is used to give a slice of the | |
91 | /// `bytes` field. |
|
91 | /// `bytes` field. | |
@@ -95,7 +95,7 b' struct IndexData {' | |||||
95 | } |
|
95 | } | |
96 |
|
96 | |||
97 | impl IndexData { |
|
97 | impl IndexData { | |
98 | pub fn new(bytes: Box<dyn Deref<Target = [u8]> + Send>) -> Self { |
|
98 | pub fn new(bytes: Box<dyn Deref<Target = [u8]> + Send + Sync>) -> Self { | |
99 | Self { |
|
99 | Self { | |
100 | bytes, |
|
100 | bytes, | |
101 | truncation: None, |
|
101 | truncation: None, | |
@@ -328,7 +328,7 b' impl Index {' | |||||
328 | /// Create an index from bytes. |
|
328 | /// Create an index from bytes. | |
329 | /// Calculate the start of each entry when is_inline is true. |
|
329 | /// Calculate the start of each entry when is_inline is true. | |
330 | pub fn new( |
|
330 | pub fn new( | |
331 | bytes: Box<dyn Deref<Target = [u8]> + Send>, |
|
331 | bytes: Box<dyn Deref<Target = [u8]> + Send + Sync>, | |
332 | default_header: IndexHeader, |
|
332 | default_header: IndexHeader, | |
333 | ) -> Result<Self, HgError> { |
|
333 | ) -> Result<Self, HgError> { | |
334 | let header = |
|
334 | let header = |
@@ -520,7 +520,7 b' unsafe fn mmap_keeparound(' | |||||
520 | data: PyObject, |
|
520 | data: PyObject, | |
521 | ) -> PyResult<( |
|
521 | ) -> PyResult<( | |
522 | PyBuffer, |
|
522 | PyBuffer, | |
523 | Box<dyn std::ops::Deref<Target = [u8]> + Send + 'static>, |
|
523 | Box<dyn std::ops::Deref<Target = [u8]> + Send + Sync + 'static>, | |
524 | )> { |
|
524 | )> { | |
525 | let buf = PyBuffer::get(py, &data)?; |
|
525 | let buf = PyBuffer::get(py, &data)?; | |
526 | let len = buf.item_count(); |
|
526 | let len = buf.item_count(); |
General Comments 0
You need to be logged in to leave comments.
Login now