JelteF / derive_more

Some more derive(Trait) options
MIT License
1.73k stars 123 forks source link

`IsVariant` fails to interpolate variant names in documentation #357

Closed alpha-tango-kilo closed 5 months ago

alpha-tango-kilo commented 5 months ago

My enum:

#[derive(Debug, Clone, PartialEq, IsVariant)]
pub enum Value<'a> {
    Array(Array<'a>),
    Dictionary(Dictionary<'a>),
    Boolean(bool),
    Data(Data<'a>),
    Date(Date),
    Float(f64),
    Integer(Integer),
    Real(f64),
    String(&'a str),
    Uid(Uid),
}

cargo expand shows this:

image

Which is also what appears in the generated (local) documentation:

image

Not sure if this is an edge case I've hit or just something no one has spotted previously

If you can point me in the approximate direction I can probably write & PR a fix, looks like some quote! tomfoolery