-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
Two $NEGATED cases look very similar, is it possible to combine them to save code?
e.g.
if $CONTAINS_NULL {
$ARRAY
.iter()
.map(|vop| match vop.map(|v| {
if $NEGATED { !$VALUES.contains(&v) } else { $VALUES.contains(&v) }
}) {
Some(true) if $NEGATED => None,
Some(false) if !$NEGATED => None,
x => x,
})
.collect::<BooleanArray>()
} else {
$ARRAY
.iter()
.map(|vop| vop.map(|v| {
if $NEGATED { !$VALUES.contains(&v) } else { $VALUES.contains(&v) }
})
.collect::<BooleanArray>()
}Originally posted by @viirya in #2809 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels