Removed uneeded Option
This commit is contained in:
parent
76f3b6592d
commit
7e4a0e5bfe
@ -1,15 +1,15 @@
|
|||||||
pub struct MOTD {
|
pub struct MOTD {
|
||||||
title: Option<String>,
|
title: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MOTD {
|
impl MOTD {
|
||||||
pub fn new(motd_title: String) -> MOTD {
|
pub fn new(motd_title: String) -> MOTD {
|
||||||
return MOTD {
|
return MOTD {
|
||||||
title: Some(String::from(motd_title)),
|
title: String::from(motd_title),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn print(&self) {
|
pub fn print(&self) {
|
||||||
println!("[*] {}", &self.title.as_ref().unwrap().trim())
|
println!("[*] {}", &self.title.trim())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user