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 91eace5 commit 4ce1890Copy full SHA for 4ce1890
hugr-core/src/hugr/linking.rs
@@ -584,9 +584,9 @@ impl NameLinkingPolicy {
584
// return Err(format!("Entrypoint is a top-level function"))
585
//}
586
let pol = self.to_node_linking_helper(target, source, true)?;
587
- if let Some(LinkAction::LinkNode(add @ NodeLinkingDirective::Add { .. })) =
588
- pol.get(&entrypoint_func)
589
- && entrypoint_func != source.entrypoint()
+ if let Some(LinkAction::LinkNode(add @ NodeLinkingDirective::Add { .. })) = pol
+ .get(&entrypoint_func)
+ .filter(|_| entrypoint_func != source.entrypoint()) // MSRV does not allow &&
590
{
591
return Err(NameLinkingError::AddFunctionContainingEntrypoint(
592
entrypoint_func,
0 commit comments