Skip to content

Commit

Permalink
dev: fix clippy warnings for: src/console/commands/import_tracker_sta…
Browse files Browse the repository at this point in the history
…tistics.rs
  • Loading branch information
da2ce7 committed May 10, 2023
1 parent 836d53f commit 7b28120
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/console/commands/import_tracker_statistics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,14 @@ fn print_usage() {
}

pub async fn run_importer() {
import(&parse_args().unwrap()).await;
import(&parse_args().expect("unable to parse command arguments")).await;
}

/// Import Command Arguments
///
/// # Panics
///
/// Panics if `Configuration::load_from_file` has any error.
pub async fn import(_args: &Arguments) {
println!("Importing statistics from linked tracker ...");

Expand All @@ -81,5 +86,8 @@ pub async fn import(_args: &Arguments) {
let tracker_statistics_importer =
Arc::new(StatisticsImporter::new(cfg.clone(), tracker_service.clone(), database.clone()).await);

tracker_statistics_importer.import_all_torrents_statistics().await.unwrap();
tracker_statistics_importer
.import_all_torrents_statistics()
.await
.expect("variable `tracker_service` is unable to `update_torrents`");
}

0 comments on commit 7b28120

Please sign in to comment.