Skip to content

Commit e082eca

Browse files
committed
Add common derives for Toggle
1 parent a8d6eee commit e082eca

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2222
- Support cortex-m-rt `v0.7.0` but still allow `v0.6.13` ([#283])
2323
- Make timer `InterruptTypes` fields public to be useful. ([#304])
2424
- Add support for the internal **signature** peripheral ([#281])
25+
- Add common derives to `Toggle`. ([#281])
2526

2627
### Fixed
2728

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ cfg_if! {
259259
/// Convenience enum and wrapper around a bool, which more explicit about the intention to enable
260260
/// or disable something, in comparison to `true` or `false`.
261261
// TODO: Maybe move to some mod like "util"?
262+
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
263+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
262264
pub enum Toggle {
263265
/// Toggle something on / enable a thing.
264266
On,

0 commit comments

Comments
 (0)