We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35361c0 commit d0de271Copy full SHA for d0de271
hugr-core/src/hugr/linking.rs
@@ -585,9 +585,9 @@ impl NameLinkingPolicy {
585
// return Err(format!("Entrypoint is a top-level function"))
586
//}
587
let pol = self.to_node_linking_helper(target, source, true)?;
588
- if let Some(LinkAction::LinkNode(add @ NodeLinkingDirective::Add { .. })) =
589
- pol.get(&entrypoint_func)
590
- && entrypoint_func != source.entrypoint()
+ if let Some(LinkAction::LinkNode(add @ NodeLinkingDirective::Add { .. })) = pol
+ .get(&entrypoint_func)
+ .filter(|_| entrypoint_func != source.entrypoint())
591
{
592
return Err(NameLinkingError::AddFunctionContainingEntrypoint(
593
entrypoint_func,
0 commit comments