summaryrefslogtreecommitdiffstats
path: root/tokio-util/src/udp/frame.rs
diff options
context:
space:
mode:
authorLucio Franco <luciofranco14@gmail.com>2020-03-04 15:54:41 -0500
committerGitHub <noreply@github.com>2020-03-04 15:54:41 -0500
commit9d4d076189822e32574f8123efe21c732103f4d4 (patch)
treee0ff83c547bacfba77d8277246e219e8e73f04f4 /tokio-util/src/udp/frame.rs
parent1eb6131321b5bb8e0ccdb7b9433f6f0ef47821f2 (diff)
codec: change Encoder to take &Item (#1746)
Co-authored-by: Markus Westerlind <marwes91@gmail.com>
Diffstat (limited to 'tokio-util/src/udp/frame.rs')
-rw-r--r--tokio-util/src/udp/frame.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tokio-util/src/udp/frame.rs b/tokio-util/src/udp/frame.rs
index c16e12f8..5b098bd4 100644
--- a/tokio-util/src/udp/frame.rs
+++ b/tokio-util/src/udp/frame.rs
@@ -70,7 +70,7 @@ impl<C: Decoder + Unpin> Stream for UdpFramed<C> {
}
}
-impl<C: Encoder + Unpin> Sink<(C::Item, SocketAddr)> for UdpFramed<C> {
+impl<I, C: Encoder<I> + Unpin> Sink<(I, SocketAddr)> for UdpFramed<C> {
type Error = C::Error;
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
@@ -84,7 +84,7 @@ impl<C: Encoder + Unpin> Sink<(C::Item, SocketAddr)> for UdpFramed<C> {
Poll::Ready(Ok(()))
}
- fn start_send(self: Pin<&mut Self>, item: (C::Item, SocketAddr)) -> Result<(), Self::Error> {
+ fn start_send(self: Pin<&mut Self>, item: (I, SocketAddr)) -> Result<(), Self::Error> {
let (frame, out_addr) = item;
let pin = self.get_mut();