denoland / fastwebsockets

A fast RFC6455 WebSocket implementation
https://docs.rs/fastwebsockets/
Apache License 2.0
880 stars 66 forks source link

Ext traits should not be used in where bounds #73

Closed Darksonn closed 8 months ago

Darksonn commented 8 months ago

The codebase has various where clauses like the following:

https://github.com/denoland/fastwebsockets/blob/5402e4eacdaebd82856e4721151e522bff00e04f/src/fragment.rs#L102-L105

It is recommended that you instead use S: AsyncRead + AsyncWrite + Unpin. Functionally they are equivalent, but avoiding the Ext traits makes more sense semantically and produces better error messages for users of your library.

littledivy commented 8 months ago

Thanks. Fixed in https://github.com/denoland/fastwebsockets/commit/d2e383348121f98533397c1a096a388f56613e39