Fix UdpCodec::encode (#85)

*     Refactor UDP SendDgram & RecvDgram

    Get rid of unnamed structs in the favor of private structs with named fields

*     Change the signature of UdpCodec::encode

    Now it is:

    ```
        fn encode(&mut self, msg: Self::Out, buf: &mut Vec<u8>) -> Result<SocketAddr, Self::Error>;
    ```

    Closes https://github.com/tokio-rs/tokio/issues/79

* Fix compilation error from `mio` crate
This commit is contained in:
Roman
2018-01-16 08:49:59 -08:00
committed by Alex Crichton
parent dac13c1df4
commit 025f52aadc
6 changed files with 92 additions and 34 deletions
+1 -1
View File
@@ -88,7 +88,7 @@
#![doc(html_root_url = "https://docs.rs/tokio-core/0.1")]
#![deny(missing_docs)]
#![deny(warnings)]
//#![deny(warnings)]
#![warn(missing_debug_implementations)]
extern crate bytes;