fix error on src not existing

This commit is contained in:
Paul Zinselmeyer 2023-08-27 23:24:20 +02:00
parent 924416149c
commit 7919ebf9a8

View file

@ -119,7 +119,11 @@ impl RelationSet {
let src = src.into(); let src = src.into();
let dst = dst.into(); let dst = dst.into();
let src = self.nodes.read().await.get(&src).unwrap().clone(); let src = if let Some(src) = self.nodes.read().await.get(&src) {
src.clone()
} else {
return false;
};
let src_neighbors = src let src_neighbors = src
.edges_out .edges_out