From d86293ad268f8a79a812a4f230ce143a91e584b4 Mon Sep 17 00:00:00 2001 From: Eduardo Trujillo <ed@chromabits.com> Date: Sun, 16 Jan 2022 13:38:48 -0800 Subject: [PATCH] refactor: Remove needless lifetimes --- src/device_watcher.rs | 4 ++-- src/identifier.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/device_watcher.rs b/src/device_watcher.rs index f09f96f..e2077ce 100644 --- a/src/device_watcher.rs +++ b/src/device_watcher.rs @@ -13,11 +13,11 @@ use crate::{ event::Event, }; -pub async fn watch_device<'a>( +pub async fn watch_device( conn: &Arc<SyncConnection>, mut stop_signal_rx: broadcast::Receiver<()>, event_tx: mpsc::Sender<Event>, - device_path: Path<'a>, + device_path: Path<'_>, ) -> Result<JoinHandle<Result<()>>> { log::debug!("Setting up signal handlers for {}", device_path); diff --git a/src/identifier.rs b/src/identifier.rs index 86d62b4..d56fd56 100644 --- a/src/identifier.rs +++ b/src/identifier.rs @@ -60,10 +60,10 @@ pub enum ConnectionIdentifier { } impl ConnectionIdentifier { - pub async fn to_connection<'a>( - &'a self, + pub async fn to_connection( + &self, conn: &Arc<SyncConnection>, - ) -> Result<Option<ConnectionWrapper<'a>>> { + ) -> Result<Option<ConnectionWrapper<'_>>> { match self { ConnectionIdentifier::ConnectionPath { connection_path } => { let connection = ConnectionWrapper::from_path(connection_path).await; @@ -91,10 +91,10 @@ pub enum ActiveConnectionIdentifier { } impl ActiveConnectionIdentifier { - pub async fn to_active_connection<'a>( - &'a self, + pub async fn to_active_connection( + &self, conn: &Arc<SyncConnection>, - ) -> Result<Option<ActiveConnectionWrapper<'a>>> { + ) -> Result<Option<ActiveConnectionWrapper<'_>>> { match self { ActiveConnectionIdentifier::ConnectionUUID { connection_uuid } => { let manager = ManagerWrapper::from_connection(conn).await; -- GitLab