From b6ee2d290453ebafd22d8aa595b826e6a99228ae Mon Sep 17 00:00:00 2001 From: Demmie <2e3s19@gmail.com> Date: Mon, 29 Jan 2024 14:08:01 -0500 Subject: [PATCH] Remove unnecessary async_trait --- watchers/src/watchers/gnome_idle.rs | 1 - watchers/src/watchers/idle.rs | 2 -- watchers/src/watchers/x11_screensaver_idle.rs | 1 - 3 files changed, 4 deletions(-) diff --git a/watchers/src/watchers/gnome_idle.rs b/watchers/src/watchers/gnome_idle.rs index cf6df35..e72d7e5 100644 --- a/watchers/src/watchers/gnome_idle.rs +++ b/watchers/src/watchers/gnome_idle.rs @@ -10,7 +10,6 @@ pub struct IdleWatcher { is_idle: bool, } -#[async_trait] impl idle::SinceLastInput for IdleWatcher { async fn seconds_since_input(&mut self) -> anyhow::Result { let ms = self diff --git a/watchers/src/watchers/idle.rs b/watchers/src/watchers/idle.rs index 911ce65..895daf7 100644 --- a/watchers/src/watchers/idle.rs +++ b/watchers/src/watchers/idle.rs @@ -1,9 +1,7 @@ use crate::report_client::ReportClient; -use async_trait::async_trait; use chrono::{Duration, Utc}; use std::sync::Arc; -#[async_trait] pub trait SinceLastInput { async fn seconds_since_input(&mut self) -> anyhow::Result; } diff --git a/watchers/src/watchers/x11_screensaver_idle.rs b/watchers/src/watchers/x11_screensaver_idle.rs index f11f831..d53b94d 100644 --- a/watchers/src/watchers/x11_screensaver_idle.rs +++ b/watchers/src/watchers/x11_screensaver_idle.rs @@ -9,7 +9,6 @@ pub struct IdleWatcher { is_idle: bool, } -#[async_trait] impl idle::SinceLastInput for IdleWatcher { async fn seconds_since_input(&mut self) -> anyhow::Result { self.client.seconds_since_last_input()