From 7e4a0e5bfe2a86c37431a452f02933f45c9ba333 Mon Sep 17 00:00:00 2001 From: Benjamyn Love Date: Tue, 6 Aug 2024 13:48:59 +1000 Subject: [PATCH] Removed uneeded Option --- src/structs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structs.rs b/src/structs.rs index 72b7c1b..fe222de 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -1,15 +1,15 @@ pub struct MOTD { - title: Option, + title: String, } impl MOTD { pub fn new(motd_title: String) -> MOTD { return MOTD { - title: Some(String::from(motd_title)), + title: String::from(motd_title), }; } pub fn print(&self) { - println!("[*] {}", &self.title.as_ref().unwrap().trim()) + println!("[*] {}", &self.title.trim()) } }