Skip to content

Commit

Permalink
Merge pull request #200 from jamwaffles/fix-clippy
Browse files Browse the repository at this point in the history
Fix new version Clippy lints
  • Loading branch information
hannobraun authored Dec 6, 2021
2 parents fb10edd + 5e44086 commit cc2633e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 28 deletions.
7 changes: 1 addition & 6 deletions src/adc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,16 +332,11 @@ pub struct Active<DmaChan, Buf> {
/// A collection of channels
///
/// Used to set up multi-channel conversions.
#[derive(Default)]
pub struct Channels {
flags: u32,
}

impl Default for Channels {
fn default() -> Self {
Channels { flags: 0 }
}
}

impl Channels {
pub fn new() -> Channels {
Default::default()
Expand Down
12 changes: 1 addition & 11 deletions src/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,19 +660,9 @@ impl SupportedWordSize for u32 {
}
}

#[derive(Clone, Copy)]
#[derive(Clone, Copy, Default)]
pub struct Interrupts {
pub transfer_error: bool,
pub half_transfer: bool,
pub transfer_complete: bool,
}

impl Default for Interrupts {
fn default() -> Self {
Self {
transfer_error: false,
half_transfer: false,
transfer_complete: false,
}
}
}
12 changes: 1 addition & 11 deletions src/rtc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,24 +370,14 @@ impl Rtc {
}

/// Flags to enable/disable RTC interrupts.
#[derive(Default)]
pub struct Interrupts {
pub timestamp: bool,
pub wakeup_timer: bool,
pub alarm_a: bool,
pub alarm_b: bool,
}

impl Default for Interrupts {
fn default() -> Self {
Self {
timestamp: false,
wakeup_timer: false,
alarm_a: false,
alarm_b: false,
}
}
}

/// The RTC wakeup timer
///
/// This timer can be used in two ways:
Expand Down

0 comments on commit cc2633e

Please sign in to comment.