From 801391e13f30ce47e80e561aff0cdb77605667a9 Mon Sep 17 00:00:00 2001 From: Per Lindgren <per.lindgren@ltu.se> Date: Sun, 7 Mar 2021 18:01:15 +0100 Subject: [PATCH] updated rtic_bare7 --- examples/rtic_bare7.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/rtic_bare7.rs b/examples/rtic_bare7.rs index ce52e30..cc7327c 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 -- GitLab