mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-09-28 04:41:02 +00:00
Clippy
This commit is contained in:
parent
c0bea15f6e
commit
f49233ad22
@ -760,7 +760,7 @@ impl<Dir> I2sDriver<'_, Dir> {
|
||||
}
|
||||
|
||||
/// Borrow the I2S driver by a reference
|
||||
pub fn as_ref(&mut self) -> I2sDriverRef<Dir> {
|
||||
pub fn as_ref(&mut self) -> I2sDriverRef<'_, Dir> {
|
||||
I2sDriverRef(unsafe { NonNull::new_unchecked(self) })
|
||||
}
|
||||
}
|
||||
@ -1222,7 +1222,7 @@ impl I2sDriver<'_, I2sBiDir> {
|
||||
/// It is safe to use the two parts separately
|
||||
/// - esp-idf guarantees thread safety
|
||||
/// - esp-idf-hal guarantees asynchronous safety
|
||||
pub fn split(&mut self) -> (I2sDriverRef<I2sRx>, I2sDriverRef<I2sTx>) {
|
||||
pub fn split(&mut self) -> (I2sDriverRef<'_, I2sRx>, I2sDriverRef<'_, I2sTx>) {
|
||||
// Safe because self cannot be null
|
||||
let this = unsafe { NonNull::new_unchecked(self) };
|
||||
|
||||
|
@ -242,7 +242,7 @@ impl IsrCriticalSection {
|
||||
/// For more information, refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/freertos-smp.html#critical-sections
|
||||
#[inline(always)]
|
||||
#[link_section = ".iram1.interrupt_cs_enter"]
|
||||
pub fn enter(&self) -> IsrCriticalSectionGuard {
|
||||
pub fn enter(&self) -> IsrCriticalSectionGuard<'_> {
|
||||
enter(self);
|
||||
|
||||
IsrCriticalSectionGuard(self)
|
||||
|
@ -530,7 +530,7 @@ impl CriticalSection {
|
||||
|
||||
#[inline(always)]
|
||||
#[link_section = ".iram1.cs_enter"]
|
||||
pub fn enter(&self) -> CriticalSectionGuard {
|
||||
pub fn enter(&self) -> CriticalSectionGuard<'_> {
|
||||
enter(self);
|
||||
|
||||
CriticalSectionGuard(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user