Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new version Clippy lints #200

Merged
merged 1 commit into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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