Removed uneeded Option

This commit is contained in:
Benjamyn Love 2024-08-06 13:48:59 +10:00
parent 76f3b6592d
commit 7e4a0e5bfe

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())
}
}