Update to rust 1.89 and edition 2024

This commit is contained in:
2025-08-28 00:57:02 +02:00
parent 01e88eeb3b
commit c5262dcf35
29 changed files with 68 additions and 81 deletions

View File

@@ -15,7 +15,7 @@ use google_home::device;
use google_home::errors::ErrorCode;
use google_home::traits::OnOff;
use google_home::types::Type;
use rumqttc::{matches, Publish};
use rumqttc::{Publish, matches};
use serde::{Deserialize, Serialize};
use serde_json::json;
use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard};
@@ -95,11 +95,11 @@ pub type OutletOnOff = Outlet<StateOnOff>;
pub type OutletPower = Outlet<StatePower>;
impl<T: OutletState> Outlet<T> {
async fn state(&self) -> RwLockReadGuard<T> {
async fn state(&self) -> RwLockReadGuard<'_, T> {
self.state.read().await
}
async fn state_mut(&self) -> RwLockWriteGuard<T> {
async fn state_mut(&self) -> RwLockWriteGuard<'_, T> {
self.state.write().await
}
}