avr-rust / delay

arduino-like delay routines based on busy-wait loops
Apache License 2.0
15 stars 11 forks source link

[cyacc] Example given is wrong, should use turbofish #31

Closed lord-ne closed 2 years ago

lord-ne commented 2 years ago

In the cycle-accurate implementation (#28), the example code in the README has delay_ms<1000000>();. However, if you actually try to compile that line, you get the following error:

error: comparison operators cannot be chained:
  |
9 |     delay_ms<1000000>();
  |             ^       ^
  |
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
  |
9 |     delay_ms::<1000000>();
  |             ++

Changing it to delay_ms::<1000000>(); fixes the issue. Thus, that example (and any others) should be updated to use the "turbofish" operator ::< >