Keyboard::new can't be const because it's not const to drop generic values, but we can work around this limitation by simply not running destructors on the set and layout.
The drawback is that in the (unlikely) case where the user passes a type that needs to be dropped we might leak resources, maybe this is worth documenting?
Keyboard::new can't be const because it's not const to drop generic values, but we can work around this limitation by simply not running destructors on the set and layout. The drawback is that in the (unlikely) case where the user passes a type that needs to be dropped we might leak resources, maybe this is worth documenting?