Skip to content

Commit 1d9c438

Browse files
bors[bot]eldruin
andauthored
Merge #65
65: SysTimer default r=posborne a=eldruin Since it is considered best-practice to have `Default` when you have `new()`. Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
2 parents 92960cc + 313d817 commit 1d9c438

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1313

1414
## [v0.4.0-alpha.1] - 2021-09-27
1515

16+
### Added
17+
18+
- `CountDown` implementation for `SysTimer`.
19+
- `Default` implementation for `SysTimer`.
20+
1621
### Changed
1722

1823
- Modified `OutputPin` behavior for active-low pins to match `InputPin` behavior.

ci/install.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

ci/script.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/timer.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ impl SysTimer {
2929
}
3030
}
3131

32+
impl Default for SysTimer {
33+
fn default() -> SysTimer {
34+
SysTimer::new()
35+
}
36+
}
37+
3238
impl CountDown for SysTimer {
3339
type Error = Infallible;
3440
type Time = Duration;

0 commit comments

Comments
 (0)