mirror of
https://github.com/pcvolkmer/checkbar.git
synced 2025-07-02 06:22:53 +00:00
Remove usage of async-trait crate
This commit is contained in:
@ -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() {
|
||||
|
@ -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() {
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user