|
wifi_manager: OnceCell<Box<dyn crate::device::wifi::WifiManager>>, |
since due to the feature flags, there is always 1 concrete type implementation. So there is no need to box, can just create type alias and call it a day. Should increase performance by a 🤏🏾.
Questioned this approach when making a time manager for #342 which had similar kobo feature gates.
cadmus/crates/core/src/device/mod.rs
Line 27 in df4d4dd
since due to the feature flags, there is always 1 concrete type implementation. So there is no need to box, can just create type alias and call it a day. Should increase performance by a 🤏🏾.
Questioned this approach when making a time manager for #342 which had similar kobo feature gates.