Derive AsRef for generic newtype
greyblake opened this issue · comments
Serhii Potapov commented
The following types should compile and work as expected:
use nutype::nutype;
use std::borrow::Cow;
#[nutype(derive(AsRef))]
struct NotEmpty<T>(Vec<T>);
#[nutype(derive(AsRef))]
struct Clarabelle<'a>(Cow<'a, str>);
Make sure to have a proper test coverage