Skip to content

Commit e12a084

Browse files
committed
Fix the warning to pass CI
1 parent 6615a78 commit e12a084

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

freertos-rust/src/critical.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl<T> ExclusiveData<T> {
3737
}
3838
}
3939

40-
pub fn lock(&self) -> Result<ExclusiveDataGuard<T>, FreeRtosError> {
40+
pub fn lock(&self) -> Result<ExclusiveDataGuard<'_, T>, FreeRtosError> {
4141
Ok(ExclusiveDataGuard {
4242
__data: &self.data,
4343
__lock: CriticalRegion::enter(),
@@ -47,7 +47,7 @@ impl<T> ExclusiveData<T> {
4747
pub fn lock_from_isr(
4848
&self,
4949
_context: &mut crate::isr::InterruptContext,
50-
) -> Result<ExclusiveDataGuardIsr<T>, FreeRtosError> {
50+
) -> Result<ExclusiveDataGuardIsr<'_, T>, FreeRtosError> {
5151
Ok(ExclusiveDataGuardIsr { __data: &self.data })
5252
}
5353
}
@@ -106,7 +106,7 @@ impl<T> SuspendScheduler<T> {
106106
}
107107
}
108108

109-
pub fn lock(&self) -> SuspendSchedulerGuard<T> {
109+
pub fn lock(&self) -> SuspendSchedulerGuard<'_,T> {
110110
unsafe {
111111
freertos_rs_vTaskSuspendAll();
112112
}

freertos-rust/src/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ where
3636
}
3737

3838
/// Try to obtain a lock and mutable access to our inner value
39-
pub fn lock<D: DurationTicks>(&self, max_wait: D) -> Result<MutexGuard<T, M>, FreeRtosError> {
39+
pub fn lock<D: DurationTicks>(&self, max_wait: D) -> Result<MutexGuard<'_, T, M>, FreeRtosError> {
4040
self.mutex.take(max_wait)?;
4141

4242
Ok(MutexGuard {

freertos-rust/src/semaphore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl Semaphore {
5050
}
5151

5252
/// Lock this semaphore in a RAII fashion
53-
pub fn lock<D: DurationTicks>(&self, max_wait: D) -> Result<SemaphoreGuard, FreeRtosError> {
53+
pub fn lock<D: DurationTicks>(&self, max_wait: D) -> Result<SemaphoreGuard<'_>, FreeRtosError> {
5454
self.take(max_wait).map(|()| SemaphoreGuard { owner: self })
5555
}
5656

0 commit comments

Comments
 (0)