Skip to content

Commit 7824d55

Browse files
committed
Fix clippy lints.
1 parent 13658c0 commit 7824d55

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

embedded-hal-async/src/digital.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub trait Wait: embedded_hal::digital::ErrorType {
3030
/// # Note for implementers
3131
/// The pin may have switched back to low before the task was run after
3232
/// being woken. The future should still resolve in that case.
33-
fn wait_for_high<'a>(&'a mut self) -> Self::WaitForHighFuture<'a>;
33+
fn wait_for_high(&mut self) -> Self::WaitForHighFuture<'_>;
3434

3535
/// The future returned by `wait_for_low`.
3636
type WaitForLowFuture<'a>: Future<Output = Result<(), Self::Error>>
@@ -42,7 +42,7 @@ pub trait Wait: embedded_hal::digital::ErrorType {
4242
/// # Note for implementers
4343
/// The pin may have switched back to high before the task was run after
4444
/// being woken. The future should still resolve in that case.
45-
fn wait_for_low<'a>(&'a mut self) -> Self::WaitForLowFuture<'a>;
45+
fn wait_for_low(&mut self) -> Self::WaitForLowFuture<'_>;
4646

4747
/// The future returned from `wait_for_rising_edge`.
4848
type WaitForRisingEdgeFuture<'a>: Future<Output = Result<(), Self::Error>>
@@ -53,7 +53,7 @@ pub trait Wait: embedded_hal::digital::ErrorType {
5353
///
5454
/// If the pin is already high, this does *not* return immediately, it'll wait for the
5555
/// pin to go low and then high again.
56-
fn wait_for_rising_edge<'a>(&'a mut self) -> Self::WaitForRisingEdgeFuture<'a>;
56+
fn wait_for_rising_edge(&mut self) -> Self::WaitForRisingEdgeFuture<'_>;
5757

5858
/// The future returned from `wait_for_falling_edge`.
5959
type WaitForFallingEdgeFuture<'a>: Future<Output = Result<(), Self::Error>>
@@ -64,45 +64,45 @@ pub trait Wait: embedded_hal::digital::ErrorType {
6464
///
6565
/// If the pin is already low, this does *not* return immediately, it'll wait for the
6666
/// pin to go high and then low again.
67-
fn wait_for_falling_edge<'a>(&'a mut self) -> Self::WaitForFallingEdgeFuture<'a>;
67+
fn wait_for_falling_edge(&mut self) -> Self::WaitForFallingEdgeFuture<'_>;
6868

6969
/// The future returned from `wait_for_any_edge`.
7070
type WaitForAnyEdgeFuture<'a>: Future<Output = Result<(), Self::Error>>
7171
where
7272
Self: 'a;
7373

7474
/// Wait for the pin to undergo any transition, i.e low to high OR high to low.
75-
fn wait_for_any_edge<'a>(&'a mut self) -> Self::WaitForAnyEdgeFuture<'a>;
75+
fn wait_for_any_edge(&mut self) -> Self::WaitForAnyEdgeFuture<'_>;
7676
}
7777

7878
impl<T: Wait> Wait for &mut T {
7979
type WaitForHighFuture<'a> = T::WaitForHighFuture<'a> where Self: 'a;
8080

81-
fn wait_for_high<'a>(&'a mut self) -> Self::WaitForHighFuture<'a> {
81+
fn wait_for_high(&mut self) -> Self::WaitForHighFuture<'_> {
8282
T::wait_for_high(self)
8383
}
8484

8585
type WaitForLowFuture<'a> = T::WaitForLowFuture<'a> where Self: 'a;
8686

87-
fn wait_for_low<'a>(&'a mut self) -> Self::WaitForLowFuture<'a> {
87+
fn wait_for_low(&mut self) -> Self::WaitForLowFuture<'_> {
8888
T::wait_for_low(self)
8989
}
9090

9191
type WaitForRisingEdgeFuture<'a> = T::WaitForRisingEdgeFuture<'a> where Self: 'a;
9292

93-
fn wait_for_rising_edge<'a>(&'a mut self) -> Self::WaitForRisingEdgeFuture<'a> {
93+
fn wait_for_rising_edge(&mut self) -> Self::WaitForRisingEdgeFuture<'_> {
9494
T::wait_for_rising_edge(self)
9595
}
9696

9797
type WaitForFallingEdgeFuture<'a> = T::WaitForFallingEdgeFuture<'a> where Self: 'a;
9898

99-
fn wait_for_falling_edge<'a>(&'a mut self) -> Self::WaitForFallingEdgeFuture<'a> {
99+
fn wait_for_falling_edge(&mut self) -> Self::WaitForFallingEdgeFuture<'_> {
100100
T::wait_for_falling_edge(self)
101101
}
102102

103103
type WaitForAnyEdgeFuture<'a> = T::WaitForAnyEdgeFuture<'a> where Self: 'a;
104104

105-
fn wait_for_any_edge<'a>(&'a mut self) -> Self::WaitForAnyEdgeFuture<'a> {
105+
fn wait_for_any_edge(&mut self) -> Self::WaitForAnyEdgeFuture<'_> {
106106
T::wait_for_any_edge(self)
107107
}
108108
}

embedded-hal-async/src/spi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,13 @@ pub trait SpiBusFlush: ErrorType {
284284
/// Wait until all operations have completed and the bus is idle.
285285
///
286286
/// See (the docs on embedded-hal)[embedded_hal::spi::blocking] for information on flushing.
287-
fn flush<'a>(&'a mut self) -> Self::FlushFuture<'a>;
287+
fn flush(&mut self) -> Self::FlushFuture<'_>;
288288
}
289289

290290
impl<T: SpiBusFlush> SpiBusFlush for &mut T {
291291
type FlushFuture<'a> = T::FlushFuture<'a> where Self: 'a;
292292

293-
fn flush<'a>(&'a mut self) -> Self::FlushFuture<'a> {
293+
fn flush(&mut self) -> Self::FlushFuture<'_> {
294294
T::flush(self)
295295
}
296296
}

embedded-hal/src/i2c.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ impl AddressMode for TenBitAddress {}
259259
/// Transactional I2C operation.
260260
///
261261
/// Several operations can be combined as part of a transaction.
262-
#[derive(Debug, PartialEq)]
262+
#[derive(Debug, PartialEq, Eq)]
263263
pub enum Operation<'a> {
264264
/// Read data into the provided buffer
265265
Read(&'a mut [u8]),

0 commit comments

Comments
 (0)