diff --git a/crates/nix-weather/build.rs b/crates/nix-weather/build.rs index e86ad04..395cd60 100644 --- a/crates/nix-weather/build.rs +++ b/crates/nix-weather/build.rs @@ -27,7 +27,10 @@ fn main() -> Result<(), Error> { let mut cmd = build_cli(); for &shell in Shell::value_variants() { // HACK: this is gross :( - let output = std::process::Command::new("mkdir").arg("man").output(); + std::process::Command::new("mkdir") + .arg("man") + .output() + .expect("failed to make man directory"); generate_to(shell, &mut cmd, "nix-weather", &outdir)?; } diff --git a/crates/nix-weather/src/cli.rs b/crates/nix-weather/src/cli.rs index 205d355..79105b6 100644 --- a/crates/nix-weather/src/cli.rs +++ b/crates/nix-weather/src/cli.rs @@ -3,15 +3,11 @@ // // SPDX-License-Identifier: EUPL-1.2 -use std::{cell::OnceCell, sync::OnceLock}; - -use clap::{arg, command, crate_authors, value_parser, Arg, ArgAction, Command}; +use clap::{arg, command, crate_authors, value_parser, ArgAction, Command}; const DEFAULT_CACHE: &str = "cache.nixos.org"; pub fn build_cli() -> Command { - use std::path::PathBuf; - command!() .author(crate_authors!("\n")) .arg( diff --git a/crates/nix-weather/src/main.rs b/crates/nix-weather/src/main.rs index cce531c..b9cee3e 100644 --- a/crates/nix-weather/src/main.rs +++ b/crates/nix-weather/src/main.rs @@ -3,7 +3,7 @@ // // SPDX-License-Identifier: EUPL-1.2 -use std::time::{Duration, Instant}; +use std::time::Instant; use std::{env, io, net::SocketAddr}; use dns_lookup::lookup_host; @@ -11,8 +11,6 @@ use futures::future::join_all; use gethostname::gethostname; use itertools::Itertools; -use log; - use crate::nix::get_requisites; mod cli; @@ -35,8 +33,8 @@ async fn main() -> io::Result<()> { let matches = cli::build_cli().get_matches(); - /// If the users inputs more -v flags than we have log levels, send them a - /// message informing them. + // If the users inputs more -v flags than we have log levels, send them a + // message informing them. let mut very_bose = false; match matches diff --git a/crates/nix-weather/src/net.rs b/crates/nix-weather/src/net.rs index 7ecc379..47c9bb3 100644 --- a/crates/nix-weather/src/net.rs +++ b/crates/nix-weather/src/net.rs @@ -8,8 +8,6 @@ use std::time::Duration; use reqwest::Client; use tokio::time::sleep; -use log; - const MAX_SLIDE: u64 = 1000; pub async fn nar_exists(client: Client, domain: &str, hash: &str, slide: u64) -> usize {