Skip to content

Commit 704f3bc

Browse files
bors[bot]Dirbaio
andauthored
Merge #333
333: delay: fix blanket impl not covering delay_ms. r=eldruin a=Dirbaio If an impl overrides the default impl for delay_ms, it was ignored when used through the blanket impl. Co-authored-by: Dario Nieuwenhuis <[email protected]>
2 parents 9941570 + 9bd5f45 commit 704f3bc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Added
1111
- `Error` traits for Can, SPI, I2C and Serial are implemented for Infallible
1212

13+
### Fixed
14+
- Fixed blanket impl of `DelayUs` not covering the `delay_ms` method.
15+
1316
## [v1.0.0-alpha.6] - 2021-11-19
1417

1518
*** This is (also) an alpha release with breaking changes (sorry) ***

src/delay.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,9 @@ pub mod blocking {
3939
fn delay_us(&mut self, us: u32) -> Result<(), Self::Error> {
4040
T::delay_us(self, us)
4141
}
42+
43+
fn delay_ms(&mut self, ms: u32) -> Result<(), Self::Error> {
44+
T::delay_ms(self, ms)
45+
}
4246
}
4347
}

0 commit comments

Comments
 (0)