mirror of
https://github.com/pfzetto/rebacs
synced 2024-11-22 11:12:49 +01:00
fix error on src not existing
This commit is contained in:
parent
924416149c
commit
7919ebf9a8
1 changed files with 5 additions and 1 deletions
|
@ -119,7 +119,11 @@ impl RelationSet {
|
|||
let src = src.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
|
||||
.edges_out
|
||||
|
|
Loading…
Reference in a new issue