2bdkid / refinement

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

{Deref, DerefMut} impl for Refinement<T, P> #1

Closed jjpe closed 2 years ago

jjpe commented 2 years ago

Hi!

I'm trying to integrate refinement into my project, and I've kind of hit a little speedbump. I need access to a &T, and Refinement<T, P> doesn't offer that ATM.

Would you be open to merging a PR adding an impl<T, P> std::ops::Deref<Target = T> for Refinement<T, P>, and then creating a new crates.io release?

2bdkid commented 2 years ago

I published version 0.4.0 with the change.

jjpe commented 2 years ago

Awesome, thanks!