Removed uneeded Option

This commit is contained in:
benjamyn committed 2024-08-06 13:48:59 +10:00
1 parent 76f3b6592d
commit 7e4a0e5bfe
1 file changed
+3 -3
+3 -3
View File
@@ -1,15 +1,15 @@
pub struct MOTD {
title: Option<String>,
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())
}
}