refactor: various clippy lints
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
parent
0863eae4b4
commit
b05095ff35
4 changed files with 8 additions and 13 deletions
|
@ -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)?;
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue