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 some clippy lints triggered by rust beta #802

Merged
merged 1 commit into from
Jun 30, 2024
Merged
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
8 changes: 4 additions & 4 deletions rp2040-hal/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ pub trait Alarm: Sealed {
/// called, this will trigger interrupt whenever this timestamp is reached.
///
/// The RP2040 is unable to schedule an event taking place in more than
/// `u32::max_value()` microseconds.
/// `u32::MAX` microseconds.
///
/// [enable_interrupt]: #method.enable_interrupt
fn schedule_at(&mut self, timestamp: Instant) -> Result<(), ScheduleAlarmError>;
Expand Down Expand Up @@ -412,13 +412,13 @@ macro_rules! impl_alarm {
/// ` whenever this timestamp is reached.
///
/// The RP2040 is unable to schedule an event taking place in more than
/// `u32::max_value()` microseconds.
/// `u32::MAX` microseconds.
///
/// [enable_interrupt]: #method.enable_interrupt
fn schedule_at(&mut self, timestamp: Instant) -> Result<(), ScheduleAlarmError> {
let now = self.0.get_counter();
let duration = timestamp.ticks().saturating_sub(now.ticks());
if duration > u32::max_value().into() {
if duration > u32::MAX.into() {
return Err(ScheduleAlarmError::AlarmTooLate);
}

Expand Down Expand Up @@ -464,7 +464,7 @@ macro_rules! impl_alarm {
/// Errors that can be returned from any of the `AlarmX::schedule` methods.
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum ScheduleAlarmError {
/// Alarm time is too high. Should not be more than `u32::max_value()` in the future.
/// Alarm time is too high. Should not be more than `u32::MAX` in the future.
AlarmTooLate,
}

Expand Down
Loading