diff --git a/examples/rtic_bare7.rs b/examples/rtic_bare7.rs index ce52e30b7080115155893df1ba4fa0ab420cc589..cc7327ce8fe6547e8c0b1ffbf8a099bebb789a1e 100644 --- a/examples/rtic_bare7.rs +++ b/examples/rtic_bare7.rs @@ -231,6 +231,10 @@ fn _toggleable_generic<E>(led: &mut dyn ToggleableOutputPin<Error = E>) { // way to implement it more efficiently. Remember, zero-cost is not without cost // just that it is as good as it possibly gets (you can't make it better by hand). // +// (You can also force the compiler to deduce the type at compile time, by using +// `impl` instead of `dyn`, if you are sure you don't want the compiler to +// "fallback" to dynamic dispatch.) +// // You might find Rust to have long compile times. Yes you are right, // and this type of deep analysis done in release mode is part of the story. // On the other hand, the aggressive optimization allows us to code