Removed uneeded Option
This commit is contained in:
1 parent
76f3b6592d
commit
7e4a0e5bfe
1 file changed
+3
-3
+3
-3
@@ -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())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user