]> git.proxmox.com Git - pve-installer.git/commitdiff
tui, common: run rustfmt
authorChristoph Heiss <c.heiss@proxmox.com>
Fri, 3 Nov 2023 09:49:36 +0000 (10:49 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 3 Nov 2023 11:52:56 +0000 (12:52 +0100)
While at it, move rustfmt.toml to the repo root, to share it with the
other crate.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
proxmox-installer-common/src/setup.rs
proxmox-tui-installer/rustfmt.toml [deleted file]
proxmox-tui-installer/src/options.rs
proxmox-tui-installer/src/setup.rs
proxmox-tui-installer/src/views/bootdisk.rs
proxmox-tui-installer/src/views/timezone.rs
rustfmt.toml [new file with mode: 0644]

index 3ef05ae75de588f8066c29581ca97b33f158ac8c..42a9e68f494fb371e37a6fb530effbe1edb83ea8 100644 (file)
@@ -365,4 +365,3 @@ impl Interface {
         format!("{} {}", self.state.render(), self.name)
     }
 }
-
diff --git a/proxmox-tui-installer/rustfmt.toml b/proxmox-tui-installer/rustfmt.toml
deleted file mode 100644 (file)
index 3a26366..0000000
+++ /dev/null
@@ -1 +0,0 @@
-edition = "2021"
index 221ad01735315b0481e9ec87efc21c68bb7ca19d..8ea704347e7eeefc892b04fe5bd236fc6d4aaaab 100644 (file)
@@ -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 {
index efcabedf23d49bc166027c2a23f55b85a238ae35..79421d78158a5f10ae45caf62914ecd90b4db912 100644 (file)
@@ -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)]
index 38a6521df8f7957c10ce16cd8bb40fc48720e5cc..7cc767828a9f79245f54b091bb1adb9dc653e470 100644 (file)
@@ -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 {
index 77fbb10f61ff1104fddca6045d3b40f5d7201557..deda600102882bc68b1ed77c4c0458be86957433 100644 (file)
@@ -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/rustfmt.toml b/rustfmt.toml
new file mode 100644 (file)
index 0000000..3a26366
--- /dev/null
@@ -0,0 +1 @@
+edition = "2021"