Skip to content

Commit 4ce1890

Browse files
committed
Support MSRV via filter not &&
1 parent 91eace5 commit 4ce1890

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
@@ -584,9 +584,9 @@ impl NameLinkingPolicy {
584584
// return Err(format!("Entrypoint is a top-level function"))
585585
//}
586586
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()
587+
if let Some(LinkAction::LinkNode(add @ NodeLinkingDirective::Add { .. })) = pol
588+
.get(&entrypoint_func)
589+
.filter(|_| entrypoint_func != source.entrypoint()) // MSRV does not allow &&
590590
{
591591
return Err(NameLinkingError::AddFunctionContainingEntrypoint(
592592
entrypoint_func,

0 commit comments

Comments
 (0)