diff options
author | 2025-04-13 10:46:12 +0100 | |
---|---|---|
committer | 2025-04-13 10:46:12 +0100 | |
commit | afc12c6a7059616b85cb50896202cd8d86be85b7 (patch) | |
tree | a058a6504fb29285d2ff084885d43a0e350ad397 | |
parent | 1c55b582a8e874b5dc776950c92a1ecf622d03fe (diff) | |
download | peanuts-afc12c6a7059616b85cb50896202cd8d86be85b7.tar.gz peanuts-afc12c6a7059616b85cb50896202cd8d86be85b7.tar.bz2 peanuts-afc12c6a7059616b85cb50896202cd8d86be85b7.zip |
fix: remove `Send` requirement for `Readable`
Diffstat (limited to '')
-rw-r--r-- | src/reader.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/reader.rs b/src/reader.rs index 0cca93f..df212bb 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -151,10 +151,8 @@ impl Readable for WebSocketOnMessageRead { } pub trait Readable { - fn read_buf( - &mut self, - buffer: &mut Buffer, - ) -> impl std::future::Future<Output = Result<usize>> + Send; + fn read_buf(&mut self, buffer: &mut Buffer) + -> impl std::future::Future<Output = Result<usize>>; } impl<R> Reader<R> { @@ -207,7 +205,7 @@ impl<R> Reader<R> { impl<R> Readable for R where - R: AsyncRead + Unpin + Send, + R: AsyncRead + Unpin, { async fn read_buf(&mut self, buffer: &mut Buffer) -> Result<usize> { Ok(tokio::io::AsyncReadExt::read_buf(self, buffer).await?) |