1
0
mirror of https://github.com/pcvolkmer/checkbar.git synced 2025-09-13 17:42:51 +00:00

Remove usage of async-trait crate

This commit is contained in:
2025-02-28 23:36:49 +01:00
parent 4ccc72783a
commit 6a9c19752a
5 changed files with 50 additions and 40 deletions

View File

@@ -1,4 +1,3 @@
use async_trait::async_trait;
use reqwest::Response;
use serde::Deserialize;
@@ -20,7 +19,6 @@ impl Checker<'_> {
}
}
#[async_trait]
impl HttpBasedChecker for Checker<'_> {
async fn check_response(response: Response) -> CheckState {
if response.status().is_success() {

View File

@@ -1,4 +1,3 @@
use async_trait::async_trait;
use reqwest::Response;
use crate::checker::{CheckState, HttpBasedChecker};
@@ -14,7 +13,6 @@ impl Checker<'_> {
}
}
#[async_trait]
impl HttpBasedChecker for Checker<'_> {
async fn check_response(response: Response) -> CheckState {
if response.status().is_success() {

View File

@@ -1,6 +1,5 @@
use std::fmt::{Display, Formatter, Result};
use async_trait::async_trait;
use console::{style, Term};
use reqwest::Response;
use serde_json::json;
@@ -100,7 +99,6 @@ pub enum CheckState {
Down,
}
#[async_trait]
pub trait HttpBasedChecker {
async fn check(&self) -> CheckResult {
CheckResult {