forked from projectmoon/tenebrous-dicebot
Remove return statements in Fuseable impl for room search.
This commit is contained in:
parent
0c0ddafd03
commit
7050cf037a
|
@ -20,17 +20,17 @@ struct RoomNameAndId {
|
||||||
/// searching room display names directly.
|
/// searching room display names directly.
|
||||||
impl Fuseable for RoomNameAndId {
|
impl Fuseable for RoomNameAndId {
|
||||||
fn properties(&self) -> Vec<FuseProperty> {
|
fn properties(&self) -> Vec<FuseProperty> {
|
||||||
return vec![FuseProperty {
|
vec![FuseProperty {
|
||||||
value: String::from("name"),
|
value: String::from("name"),
|
||||||
weight: 1.0,
|
weight: 1.0,
|
||||||
}];
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn lookup(&self, key: &str) -> Option<&str> {
|
fn lookup(&self, key: &str) -> Option<&str> {
|
||||||
return match key {
|
match key {
|
||||||
"name" => Some(&self.name),
|
"name" => Some(&self.name),
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue