Skip to content

Commit

Permalink
Tweak expectation error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ggiraldez committed Feb 7, 2025
1 parent 3304470 commit 66288a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/metaslang/bindings/src/graph/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,12 @@ impl Resolver {
}

pub(crate) fn definition_to_references(&self, handle: GraphHandle) -> Vec<GraphHandle> {
let Some(ref definitions) = self.definitions else {
unreachable!("All references have been resolved");
};
definitions.get(&handle).cloned().unwrap_or_default()
self.definitions
.as_ref()
.expect("All references should have been resolved")
.get(&handle)
.cloned()
.unwrap_or_default()
}
}

Expand Down

0 comments on commit 66288a0

Please sign in to comment.