diff options
author | Lucio Franco <luciofranco14@gmail.com> | 2020-03-04 15:54:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-04 15:54:41 -0500 |
commit | 9d4d076189822e32574f8123efe21c732103f4d4 (patch) | |
tree | e0ff83c547bacfba77d8277246e219e8e73f04f4 /examples/tinyhttp.rs | |
parent | 1eb6131321b5bb8e0ccdb7b9433f6f0ef47821f2 (diff) |
codec: change Encoder to take &Item (#1746)
Co-authored-by: Markus Westerlind <marwes91@gmail.com>
Diffstat (limited to 'examples/tinyhttp.rs')
-rw-r--r-- | examples/tinyhttp.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/tinyhttp.rs b/examples/tinyhttp.rs index 9ac2806e..732da0d6 100644 --- a/examples/tinyhttp.rs +++ b/examples/tinyhttp.rs @@ -96,8 +96,7 @@ struct Http; /// Implementation of encoding an HTTP response into a `BytesMut`, basically /// just writing out an HTTP/1.1 response. -impl Encoder for Http { - type Item = Response<String>; +impl Encoder<Response<String>> for Http { type Error = io::Error; fn encode(&mut self, item: Response<String>, dst: &mut BytesMut) -> io::Result<()> { |