From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 5DC929EBAA for ; Fri, 3 Nov 2023 10:50:31 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 33AF51AB84 for ; Fri, 3 Nov 2023 10:50:31 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 3 Nov 2023 10:50:22 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9B955441AD for ; Fri, 3 Nov 2023 10:50:22 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Fri, 3 Nov 2023 10:49:36 +0100 Message-ID: <20231103095016.286953-2-c.heiss@proxmox.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231103095016.286953-1-c.heiss@proxmox.com> References: <20231103095016.286953-1-c.heiss@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.015 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH installer 1/2] tui, common: run rustfmt X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2023 09:50:31 -0000 While at it, move rustfmt.toml to the repo root, to share it with the other crate. Signed-off-by: Christoph Heiss --- proxmox-installer-common/src/setup.rs | 1 - proxmox-tui-installer/src/options.rs | 12 ++++++------ proxmox-tui-installer/src/setup.rs | 14 +++++--------- proxmox-tui-installer/src/views/bootdisk.rs | 10 ++++++---- proxmox-tui-installer/src/views/timezone.rs | 4 +--- proxmox-tui-installer/rustfmt.toml => rustfmt.toml | 0 6 files changed, 18 insertions(+), 23 deletions(-) rename proxmox-tui-installer/rustfmt.toml => rustfmt.toml (100%) diff --git a/proxmox-installer-common/src/setup.rs b/proxmox-installer-common/src/setup.rs index 3ef05ae..42a9e68 100644 --- a/proxmox-installer-common/src/setup.rs +++ b/proxmox-installer-common/src/setup.rs @@ -365,4 +365,3 @@ impl Interface { format!("{} {}", self.state.render(), self.name) } } - diff --git a/proxmox-tui-installer/src/options.rs b/proxmox-tui-installer/src/options.rs index 221ad01..8ea7043 100644 --- a/proxmox-tui-installer/src/options.rs +++ b/proxmox-tui-installer/src/options.rs @@ -1,11 +1,11 @@ use crate::SummaryOption; use proxmox_installer_common::{ - setup::LocaleInfo, options::{ - BootdiskOptions, BtrfsRaidLevel, FsType, NetworkOptions, TimezoneOptions, - PasswordOptions, ZfsRaidLevel, + BootdiskOptions, BtrfsRaidLevel, FsType, NetworkOptions, PasswordOptions, TimezoneOptions, + ZfsRaidLevel, }, + setup::LocaleInfo, }; pub const FS_TYPES: &[FsType] = { @@ -70,13 +70,13 @@ mod tests { use super::*; use proxmox_installer_common::{ setup::{ - Dns, Gateway, Interface, InterfaceState, IsoInfo, IsoLocations, NetworkInfo, ProductConfig, - ProxmoxProduct, Routes, SetupInfo, + Dns, Gateway, Interface, InterfaceState, IsoInfo, IsoLocations, NetworkInfo, + ProductConfig, ProxmoxProduct, Routes, SetupInfo, }, utils::{CidrAddress, Fqdn}, }; - use std::{collections::HashMap, path::PathBuf}; use std::net::{IpAddr, Ipv4Addr}; + use std::{collections::HashMap, path::PathBuf}; fn dummy_setup_info() -> SetupInfo { SetupInfo { diff --git a/proxmox-tui-installer/src/setup.rs b/proxmox-tui-installer/src/setup.rs index efcabed..79421d7 100644 --- a/proxmox-tui-installer/src/setup.rs +++ b/proxmox-tui-installer/src/setup.rs @@ -1,17 +1,13 @@ -use std::{ - collections::HashMap, - fmt, - net::IpAddr, -}; +use std::{collections::HashMap, fmt, net::IpAddr}; use serde::{Serialize, Serializer}; use crate::options::InstallerOptions; use proxmox_installer_common::{ - options::{AdvancedBootdiskOptions, BtrfsRaidLevel, Disk, FsType, ZfsRaidLevel}, - setup::InstallZfsOption, - utils::CidrAddress, - }; + options::{AdvancedBootdiskOptions, BtrfsRaidLevel, Disk, FsType, ZfsRaidLevel}, + setup::InstallZfsOption, + utils::CidrAddress, +}; /// See Proxmox::Install::Config #[derive(Serialize)] diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/proxmox-tui-installer/src/views/bootdisk.rs index 38a6521..7cc7678 100644 --- a/proxmox-tui-installer/src/views/bootdisk.rs +++ b/proxmox-tui-installer/src/views/bootdisk.rs @@ -14,13 +14,15 @@ use crate::options::FS_TYPES; use crate::InstallerState; use proxmox_installer_common::{ + disk_checks::{ + check_btrfs_raid_config, check_disks_4kn_legacy_boot, check_for_duplicate_disks, + check_zfs_raid_config, + }, options::{ - AdvancedBootdiskOptions, BootdiskOptions, BtrfsBootdiskOptions, Disk, - FsType, LvmBootdiskOptions, ZfsBootdiskOptions, - ZFS_CHECKSUM_OPTIONS, ZFS_COMPRESS_OPTIONS, + AdvancedBootdiskOptions, BootdiskOptions, BtrfsBootdiskOptions, Disk, FsType, + LvmBootdiskOptions, ZfsBootdiskOptions, ZFS_CHECKSUM_OPTIONS, ZFS_COMPRESS_OPTIONS, }, setup::{BootType, ProductConfig, ProxmoxProduct}, - disk_checks::{check_btrfs_raid_config, check_for_duplicate_disks, check_disks_4kn_legacy_boot, check_zfs_raid_config}, }; pub struct BootdiskOptionsView { diff --git a/proxmox-tui-installer/src/views/timezone.rs b/proxmox-tui-installer/src/views/timezone.rs index 77fbb10..deda600 100644 --- a/proxmox-tui-installer/src/views/timezone.rs +++ b/proxmox-tui-installer/src/views/timezone.rs @@ -5,9 +5,7 @@ use cursive::{ }; use super::FormView; -use crate::{ - system, InstallerState, -}; +use crate::{system, InstallerState}; use proxmox_installer_common::{ options::TimezoneOptions, setup::{KeyboardMapping, LocaleInfo}, diff --git a/proxmox-tui-installer/rustfmt.toml b/rustfmt.toml similarity index 100% rename from proxmox-tui-installer/rustfmt.toml rename to rustfmt.toml -- 2.42.0