Skip to content

Commit

Permalink
format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hungfnt committed Apr 24, 2024
1 parent b301596 commit 7de4fbc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/console/clients/checker/checks/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ use std::time::Duration;

use reqwest::{Client as HttpClient, Url, Url as ServiceUrl};

use crate::console::clients::checker::service::{CheckError, CheckResult};

use super::structs::{CheckerOutput, Status};
use crate::console::clients::checker::service::{CheckError, CheckResult};

#[allow(clippy::missing_panics_doc)]
pub async fn run(health_checks: &Vec<ServiceUrl>, check_results: &mut Vec<CheckResult>) -> Vec<CheckerOutput> {

Check warning on line 9 in src/console/clients/checker/checks/health.rs

View check run for this annotation

Codecov / codecov/patch

src/console/clients/checker/checks/health.rs#L9

Added line #L9 was not covered by tests
Expand Down
3 changes: 1 addition & 2 deletions src/console/clients/checker/checks/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ use reqwest::Url as ServiceUrl;
use torrust_tracker_primitives::info_hash::InfoHash;
use url::Url;

use super::structs::{CheckerOutput, Status};
use crate::console::clients::checker::service::{CheckError, CheckResult};
use crate::shared::bit_torrent::tracker::http::client::requests::announce::QueryBuilder;
use crate::shared::bit_torrent::tracker::http::client::responses::announce::Announce;
use crate::shared::bit_torrent::tracker::http::client::responses::scrape;
use crate::shared::bit_torrent::tracker::http::client::{requests, Client};

use super::structs::{CheckerOutput, Status};

#[allow(clippy::missing_panics_doc)]
pub async fn run(http_trackers: &Vec<ServiceUrl>, check_results: &mut Vec<CheckResult>) -> Vec<CheckerOutput> {

Check warning on line 16 in src/console/clients/checker/checks/http.rs

View check run for this annotation

Codecov / codecov/patch

src/console/clients/checker/checks/http.rs#L16

Added line #L16 was not covered by tests
let mut http_checkers: Vec<CheckerOutput> = Vec::new();
Expand Down
3 changes: 1 addition & 2 deletions src/console/clients/checker/checks/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ use hex_literal::hex;
use log::debug;
use torrust_tracker_primitives::info_hash::InfoHash;

use crate::console::clients::checker::checks::structs::{CheckerOutput, Status};
use crate::console::clients::checker::service::{CheckError, CheckResult};
use crate::console::clients::udp::checker;

use crate::console::clients::checker::checks::structs::{CheckerOutput, Status};

const ASSIGNED_BY_OS: u16 = 0;
const RANDOM_TRANSACTION_ID: i32 = -888_840_697;

Expand Down
2 changes: 0 additions & 2 deletions src/console/clients/checker/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ impl Service {
/// Will return OK is all checks pass or an array with the check errors.
#[allow(clippy::missing_panics_doc)]
pub async fn run_checks(&self) -> Vec<CheckResult> {
self.console.println("Running checks for trackers ...");

let mut check_results = vec![];

let udp_checkers = checks::udp::run(&self.config.udp_trackers, &mut check_results).await;
Expand Down

0 comments on commit 7de4fbc

Please sign in to comment.