mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 14:00:01 -04:00
sink<&[u8]> is basically useless, don't accept
This commit is contained in:
parent
888044f63d
commit
b602b38c47
1 changed files with 3 additions and 3 deletions
|
@ -552,7 +552,7 @@ impl MuxStreamIoSink {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Sink<&[u8]> for MuxStreamIoSink {
|
impl Sink<BytesMut> for MuxStreamIoSink {
|
||||||
type Error = std::io::Error;
|
type Error = std::io::Error;
|
||||||
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||||
self.project()
|
self.project()
|
||||||
|
@ -560,10 +560,10 @@ impl Sink<&[u8]> for MuxStreamIoSink {
|
||||||
.poll_ready(cx)
|
.poll_ready(cx)
|
||||||
.map_err(std::io::Error::other)
|
.map_err(std::io::Error::other)
|
||||||
}
|
}
|
||||||
fn start_send(self: Pin<&mut Self>, item: &[u8]) -> Result<(), Self::Error> {
|
fn start_send(self: Pin<&mut Self>, item: BytesMut) -> Result<(), Self::Error> {
|
||||||
self.project()
|
self.project()
|
||||||
.tx
|
.tx
|
||||||
.start_send(Payload::Bytes(BytesMut::from(item)))
|
.start_send(Payload::Bytes(item))
|
||||||
.map_err(std::io::Error::other)
|
.map_err(std::io::Error::other)
|
||||||
}
|
}
|
||||||
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue