meilisearch/meilisearch-rust

Implement `std::marker::Send` for SearchResults

jackpeters667 opened this issue · 4 comments

Description
I'm trying to update my application following the new changes where we can use custom http clients following #524 (comment)

struct MyStruct {
    value: String
}
[dependencies]
meilisearch-sdk = "0.26.0"

[patch.crates-io]
meilisearch-sdk = { git = "https://github.com/meilisearch/meilisearch-rust", rev = "043a553" }

When I try to compile:

dyn futures_util::Future<Output = Result<SearchResults<MyStruct>, meilisearch_sdk::errors::Error>>` cannot be sent between threads safely

Hello, yes, I know. Sorry, this is not expected and will be fixed for the next release.

Thanks for the issue! And if you have an idea of how to fix it while also keeping the awc example working I would love to hear it!

Thanks for the awesome work!

And if you have an idea of how to fix it while also keeping the awc example working I would love to hear it!

I'll take a look and see if I can come up with something

Hey @jackpeters667 and @c1wren, it would be nice if you could try to integrate this version (the main branch) in your code again and get back to me.
If everything works for you, we'll make a release right after 😁

@irevoire Everything is working for me now. Thank you!!