Switched over to using operators instead of compare in the renderer.
This commit is contained in:
parent
596611c03a
commit
d77ab7401c
@ -343,19 +343,19 @@ impl<'a> DustRenderer<'a> {
|
||||
)
|
||||
}
|
||||
(Ok(left_side_unwrapped), Ok(right_side_unwrapped)) => {
|
||||
return match left_side_unwrapped.partial_cmp(&right_side_unwrapped) {
|
||||
Some(Ordering::Greater) | Some(Ordering::Equal) | None => self
|
||||
.render_maybe_body(
|
||||
¶meterized_block.contents,
|
||||
breadcrumbs,
|
||||
blocks,
|
||||
),
|
||||
Some(Ordering::Less) => self.render_maybe_body(
|
||||
if left_side_unwrapped >= right_side_unwrapped {
|
||||
return self.render_maybe_body(
|
||||
¶meterized_block.contents,
|
||||
breadcrumbs,
|
||||
blocks,
|
||||
);
|
||||
} else {
|
||||
return self.render_maybe_body(
|
||||
¶meterized_block.else_contents,
|
||||
breadcrumbs,
|
||||
blocks,
|
||||
),
|
||||
};
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -415,19 +415,19 @@ impl<'a> DustRenderer<'a> {
|
||||
)
|
||||
}
|
||||
(Ok(left_side_unwrapped), Ok(right_side_unwrapped)) => {
|
||||
return match left_side_unwrapped.partial_cmp(&right_side_unwrapped) {
|
||||
Some(Ordering::Less) | Some(Ordering::Equal) | None => self
|
||||
.render_maybe_body(
|
||||
¶meterized_block.contents,
|
||||
breadcrumbs,
|
||||
blocks,
|
||||
),
|
||||
Some(Ordering::Greater) => self.render_maybe_body(
|
||||
if left_side_unwrapped <= right_side_unwrapped {
|
||||
return self.render_maybe_body(
|
||||
¶meterized_block.contents,
|
||||
breadcrumbs,
|
||||
blocks,
|
||||
);
|
||||
} else {
|
||||
return self.render_maybe_body(
|
||||
¶meterized_block.else_contents,
|
||||
breadcrumbs,
|
||||
blocks,
|
||||
),
|
||||
};
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user