Change Connected::connect_info to return Self (#396)

I've been thinking that having an associated type probably isn't
necessary. I imagine most users are either using `SocketAddr` to the
remote connection IP, or writing their own connection struct.
This commit is contained in:
David Pedersen
2021-10-19 23:06:15 +02:00
committed by GitHub
parent a724af3d0a
commit 9fcc884374
4 changed files with 10 additions and 18 deletions
+1 -3
View File
@@ -429,9 +429,7 @@ impl<S> Router<S> {
/// }
///
/// impl Connected<&AddrStream> for MyConnectInfo {
/// type ConnectInfo = MyConnectInfo;
///
/// fn connect_info(target: &AddrStream) -> Self::ConnectInfo {
/// fn connect_info(target: &AddrStream) -> Self {
/// MyConnectInfo {
/// // ...
/// }