From 28137c5f5299027cb7b4f3e706bf495f59446d59 Mon Sep 17 00:00:00 2001 From: Lleyton Gray Date: Wed, 3 Jul 2024 18:17:37 -0700 Subject: [PATCH] chore: apply various clippy fixes --- src/backend/l10n.rs | 2 +- src/disks.rs | 3 +-- src/install.rs | 1 - src/main.rs | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/backend/l10n.rs b/src/backend/l10n.rs index d6f825c..a4b02dd 100644 --- a/src/backend/l10n.rs +++ b/src/backend/l10n.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; pub fn list_locales() -> Vec { gnome_desktop::all_locales() .iter() - .map(|gs| gs.to_string()) + .map(std::string::ToString::to_string) .collect_vec() } diff --git a/src/disks.rs b/src/disks.rs index 8b5e03a..f55b4d6 100644 --- a/src/disks.rs +++ b/src/disks.rs @@ -4,7 +4,6 @@ mod osprobe; -use color_eyre::eyre::OptionExt; use osprobe::OSProbe; use std::{collections::HashMap, path::PathBuf}; @@ -48,7 +47,7 @@ pub fn detect_os() -> Vec { .find(|(path, _)| path.starts_with(&disk.name)) .map(|(_, osname)| osname.to_string()) .unwrap_or(OSNAME_PLACEHOLDER.to_string()), - devpath: PathBuf::from(disk.fullname.clone()), + devpath: disk.fullname.clone(), }; tracing::debug!(?ret, "Found disk"); ret diff --git a/src/install.rs b/src/install.rs index e4de20c..235772f 100644 --- a/src/install.rs +++ b/src/install.rs @@ -1,5 +1,4 @@ use color_eyre::Result; -use gtk::gdk::Monitor; use std::path::{Path, PathBuf}; use sys_mount::Unmount; diff --git a/src/main.rs b/src/main.rs index 20972c7..e4303d7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,6 @@ use tracing_subscriber::prelude::*; #[derive(Debug, Default)] struct InstallationState { - pub timezone: Option, pub langlocale: Option, pub destination_disk: Option, pub installation_type: Option,