Skip to content

Implicit construction of crow::multipart::message from crow::request #839

@bgs99

Description

@bgs99

Would you consider marking crow::multipart::message constructor from crow::request as explicit?

Parsing multipart message is a somewhat computationally expensive process, and currently (#838) leads to excessive memory copying.

I have encountered this problem when writing and using small helpers that extract data from multipart messages - accidentally passing a crow::request there instead of a crow::multipart::message leads to re-parsing of the request.
Marking the constructor as explicit would make this error easily noticeable and less probable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureCode based project improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions