This commit is contained in:
John Smith 2022-12-18 18:12:54 -05:00
parent 65dede4c75
commit 71be7cf1ab

View File

@ -32,6 +32,9 @@ fn get_string(text: &str) -> Option<String> {
fn get_route_id(rss: RouteSpecStore) -> impl Fn(&str) -> Option<DHTKey> { fn get_route_id(rss: RouteSpecStore) -> impl Fn(&str) -> Option<DHTKey> {
return move |text: &str| { return move |text: &str| {
if text.is_empty() {
return None;
}
match DHTKey::try_decode(text).ok() { match DHTKey::try_decode(text).ok() {
Some(key) => { Some(key) => {
let routes = rss.list_allocated_routes(|k, _| Some(*k)); let routes = rss.list_allocated_routes(|k, _| Some(*k));