refactor: various clippy lints
Some checks failed
Security audit / security_audit (pull_request) Has been cancelled
Conventional Commits / Conventional Commits (pull_request) Successful in 6s
Check Flake / security_audit (pull_request) Successful in 7m2s

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
Christina Sørensen 2024-09-07 11:44:24 +02:00
parent 0863eae4b4
commit b05095ff35
Signed by: cafkafk
GPG key ID: 26C542FD97F965CE
4 changed files with 8 additions and 13 deletions

View file

@ -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)?;
}

View file

@ -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(

View file

@ -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

View file

@ -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 {