From fec71fdda4c5d48741e5ff8cdb66d9b3d2d52b9b Mon Sep 17 00:00:00 2001 From: Ryan Brue Date: Mon, 6 May 2024 16:09:35 -0500 Subject: [PATCH] feat(applet): impl ToString for PanelType --- src/applet/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/applet/mod.rs b/src/applet/mod.rs index d89535a..35bf42d 100644 --- a/src/applet/mod.rs +++ b/src/applet/mod.rs @@ -49,6 +49,16 @@ pub enum PanelType { Other(String), } +impl ToString for PanelType { + fn to_string(&self) -> String { + match self { + Self::Panel => "Panel".to_string(), + Self::Dock => "Dock".to_string(), + Self::Other(other) => other.clone(), + } + } +} + impl From for PanelType { fn from(value: String) -> Self { match value.as_str() {