websockets-rs / rust-websocket

A WebSocket (RFC6455) library written in Rust
http://websockets-rs.github.io/rust-websocket/
MIT License
1.55k stars 223 forks source link

Implement `AsTcpStream` for `Box<dyn AsTcpStream>` #205

Closed sgrif closed 5 years ago

sgrif commented 5 years ago

The current impl<T: AsTcpStream> AsTcpStream for Box<T> requires T: Sized. This means that anyone using ClientBuilder::connect will not be able to call the various shutdown methods, since the returned type is Box<dyn NetworkStream + Send>. After this change, the modified impl will apply to Box<dyn NetworkStream + Send>, which was presumably always intended.

vi commented 5 years ago

Published v0.22.2.