mendelt / cmdr

Cmdr is a library for building line-oriented text-based user interfaces in Rust.
Apache License 2.0
15 stars 1 forks source link

#[cmdr] does not seem to work when the struct has generic type parameters #36

Closed gferon closed 5 years ago

gferon commented 5 years ago

e.g.

struct MoveScope<T>;

#[cmdr]
impl<T> MoveScope<T> {
...
}

I guess we have to start digging now :)

mendelt commented 5 years ago

Thank you for reporting this. I'll see if I can fix this in the next release. For now I've added an example for a workaround here: https://github.com/mendelt/cmdr/blob/master/cmdr/examples/04-generic_scope.rs

mendelt commented 5 years ago

This should be fixed in 0.3.5