mirror of
https://github.com/2e3s/awatcher.git
synced 2025-06-06 19:45:30 +00:00
Remove unnecessary async_trait
This commit is contained in:
parent
e39e720f5e
commit
b6ee2d2904
@ -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<u32> {
|
||||
let ms = self
|
||||
|
@ -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<u32>;
|
||||
}
|
||||
|
@ -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<u32> {
|
||||
self.client.seconds_since_last_input()
|
||||
|
Loading…
x
Reference in New Issue
Block a user