Skip to content

Commit

Permalink
Add Send and Sync traits to Record.bytes() (#6)
Browse files Browse the repository at this point in the history
* add Send and Sync traits to Record.bytes()

* update CHANGELOG
  • Loading branch information
atimin committed Mar 22, 2024
1 parent e72ec5a commit 4936a1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Fixed

* Fix sorting batched data, [PR-5](https://github.com/reductstore/reduct-rs/pull/5)
* Add Send and Sync traits to Record.bytes(), [PR-6](https://github.com/reductstore/reduct-rs/pull/6)

## [1.9.2] - 2024-03-08

Expand Down
4 changes: 3 additions & 1 deletion src/record.rs
Expand Up @@ -81,7 +81,9 @@ impl Record {
/// Content of the record
///
/// This consumes the record and returns bytes
pub fn bytes(self) -> Pin<Box<dyn futures::Future<Output = Result<Bytes, ReductError>>>> {
pub fn bytes(
self,
) -> Pin<Box<dyn futures::Future<Output = Result<Bytes, ReductError>> + Send + Sync>> {
Box::pin(async move {
if let Some(mut data) = self.data {
let mut bytes = BytesMut::new();
Expand Down

0 comments on commit 4936a1f

Please sign in to comment.