2bdkid / refinement

Convenient creation of type-safe refinement types.
18 stars 4 forks source link

Manually implement Clone & Copy for Refinement<T, P> #3

Closed jjpe closed 2 years ago

jjpe commented 2 years ago

The motivation for this change is that given Refinement<T, P>, this manual impl imposes no demands on the P predicate type argument. The derive does impose such a constraint, as can be seen here. That has proven both undesirable and unnecessary.

jjpe commented 2 years ago

I was actually hoping you hadn't merged this yet - there's a similar commit in the pipeline for impl std::fmt::Debug for Refinement<T, P> :)