mirror of
https://github.com/2e3s/awatcher.git
synced 2025-06-07 12:05:49 +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,
|
is_idle: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait]
|
|
||||||
impl idle::SinceLastInput for IdleWatcher {
|
impl idle::SinceLastInput for IdleWatcher {
|
||||||
async fn seconds_since_input(&mut self) -> anyhow::Result<u32> {
|
async fn seconds_since_input(&mut self) -> anyhow::Result<u32> {
|
||||||
let ms = self
|
let ms = self
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
use crate::report_client::ReportClient;
|
use crate::report_client::ReportClient;
|
||||||
use async_trait::async_trait;
|
|
||||||
use chrono::{Duration, Utc};
|
use chrono::{Duration, Utc};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
#[async_trait]
|
|
||||||
pub trait SinceLastInput {
|
pub trait SinceLastInput {
|
||||||
async fn seconds_since_input(&mut self) -> anyhow::Result<u32>;
|
async fn seconds_since_input(&mut self) -> anyhow::Result<u32>;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ pub struct IdleWatcher {
|
|||||||
is_idle: bool,
|
is_idle: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait]
|
|
||||||
impl idle::SinceLastInput for IdleWatcher {
|
impl idle::SinceLastInput for IdleWatcher {
|
||||||
async fn seconds_since_input(&mut self) -> anyhow::Result<u32> {
|
async fn seconds_since_input(&mut self) -> anyhow::Result<u32> {
|
||||||
self.client.seconds_since_last_input()
|
self.client.seconds_since_last_input()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user