shio-rs icon indicating copy to clipboard operation
shio-rs copied to clipboard

Method should implement Clone

Open ebkalderon opened this issue 7 years ago • 0 comments

While working with Shio, I ran into an issue where I needed the shio::http::Method struct to implement Clone. The underlying http_types::Method type is Clone-able, so the wrapper data structure probably should be too.

I worked around this for now by creating my own custom Method struct which is both Clone and Into<shio::http::Method>, but in general, it's considered good practice to derive common traits (e.g. Clone, Debug, Eq, Hash, PartialEq) for most public data types where possible.

ebkalderon avatar Oct 15 '18 10:10 ebkalderon