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

Activate clippy checks on exported APIs #587

Merged
merged 1 commit into from
Apr 23, 2023
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
1 change: 1 addition & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
avoid-breaking-exported-api = false
2 changes: 2 additions & 0 deletions rp2040-hal/src/dma/bidirectional.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ where
}
}

#[allow(clippy::wrong_self_convention)]
/// Set the transfer pacing for the DMA transfer from the source
pub fn from_pace(&mut self, pace: Pace) {
self.from_pace = pace;
}

#[allow(clippy::wrong_self_convention)]
/// Set the transfer pacing for the DMA transfer to the target
pub fn to_pace(&mut self, pace: Pace) {
self.to_pace = pace;
Expand Down
1 change: 1 addition & 0 deletions rp2040-hal/src/gpio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub use dynpin::*;

mod reg;

#[allow(clippy::enum_variant_names)]
#[derive(Clone, Copy, Eq, PartialEq, Debug)]
/// The amount of current that a pin can drive when used as an output
pub enum OutputDriveStrength {
Expand Down
1 change: 1 addition & 0 deletions rp2040-hal/src/pio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ impl PIOExt for PIO1 {
}
}

#[allow(clippy::upper_case_acronyms)]
/// Programmable IO Block
pub struct PIO<P: PIOExt> {
used_instruction_space: u32, // bit for each PIO_INSTRUCTION_COUNT
Expand Down
1 change: 1 addition & 0 deletions rp2040-hal/src/rtc/datetime_no_deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use rp2040_pac::rtc::{rtc_0, rtc_1, setup_0, setup_1};
/// Errors regarding the [`DateTime`] and [`DateTimeFilter`] structs.
///
/// [`DateTimeFilter`]: struct.DateTimeFilter.html
#[allow(clippy::enum_variant_names)]
#[derive(Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error {
Expand Down