actix-web
actix-web copied to clipboard
consider unifying `web::Payload` and `dev::Payload`
Having them as separate type with the same name can be confusing and I don't really see the reason why web::Payload is a newtype of dev::Payload. Making web::Payload a reexport of dev::Payload can mitigate this with least migration pain.
Your Environment
- Rust Version (I.e, output of
rustc -V): - Actix Web Version: v4.0-beta.21
Don't know why particularly. Only difference is that web::Payload is a non generic type.
from fake, for posterity:
Here are some cap:
- actix-http Payload type does not need to be generic if the current feature is enough.
- Payload type should be separated into Request/Response types. You are doing it unkowningly without renaming them in the process.
- A generic Payload(According to point 2 it really is Request Payload) type is a great additional feature for pre-request body zero cost mutation(like decompress). The first step should be make awc stop importing the type though.
see this and other dicussion: https://discord.com/channels/771444961383153695/771448320807272458/934947114855825448