]> git.proxmox.com Git - pve-installer.git/commitdiff
common: add Display trait to ProxmoxProduct
authorAaron Lauterer <a.lauterer@proxmox.com>
Wed, 17 Apr 2024 12:30:52 +0000 (14:30 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Apr 2024 12:31:37 +0000 (14:31 +0200)
Tested-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Christoph Heiss <c.heiss@proxmox.com>
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-installer-common/src/setup.rs

index 36a6bd4dc0afb765443e1db412df6504dd3aeddd..c58047726fa16857cefe32250adb8e82d533f7a1 100644 (file)
@@ -38,6 +38,16 @@ impl ProxmoxProduct {
     }
 }
 
+impl fmt::Display for ProxmoxProduct {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            Self::PVE => write!(f, "pve"),
+            Self::PMG => write!(f, "pmg"),
+            Self::PBS => write!(f, "pbs"),
+        }
+    }
+}
+
 #[derive(Clone, Deserialize)]
 pub struct ProductConfig {
     pub fullname: String,