quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

Rename variable of example #1289

Closed sizumita closed 2 years ago

sizumita commented 2 years ago

endpoint.connect returns NewConnection so I think we should rename from connection to new_connection. And let connection = new_connection.connection; is easy to understand but it's not good because of partial move. Any ideas?

djc commented 2 years ago

I think it would be nice to destruct it? let NewConnection { connection, .. } = new_connection;.

sizumita commented 2 years ago

That's a good one.