Skip to content

Commit d0de271

Browse files
committed
support MSRV
1 parent 35361c0 commit d0de271

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hugr-core/src/hugr/linking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,9 @@ impl NameLinkingPolicy {
585585
// return Err(format!("Entrypoint is a top-level function"))
586586
//}
587587
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()
588+
if let Some(LinkAction::LinkNode(add @ NodeLinkingDirective::Add { .. })) = pol
589+
.get(&entrypoint_func)
590+
.filter(|_| entrypoint_func != source.entrypoint())
591591
{
592592
return Err(NameLinkingError::AddFunctionContainingEntrypoint(
593593
entrypoint_func,

0 commit comments

Comments
 (0)