Closed nickmonad closed 2 years ago
Hey there,
I agree, deriving Clone
on every response
type makes sense. It would be great if you could implement it for the remaining response
types as well and I will merge it right after!
Also yeah, I should definitely add a CONTRIBUTING.md
to the repository to pave the way for future contributions :)
@puetzp Awesome! I added #[derive(Clone)]
to all response
types
First off, great project! This is exactly what I needed to help me implement a prometheus analysis tool I'm currently working on. I didn't see a
CONTRIBUTING.md
in the repo, so hopefully I'm checking all the boxes here.I have a need to attach some
response
data types to custom structs, like so,Without
Clone
on theseresponse
types, the following wouldn't be possible, since we can't "move" ownership out of theVec<MetricMetadata>
coming from the client, and dealing with references and lifetimes could get ugly real fast.I went ahead and just put
#[derive(Clone)]
on the types I needed to implement it, but if you want, I could also update allresponse
types to deriveClone
that can automatically do so.cargo test
passed locally with this change.