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)) => {
|
(Ok(left_side_unwrapped), Ok(right_side_unwrapped)) => {
|
||||||
return match left_side_unwrapped.partial_cmp(&right_side_unwrapped) {
|
if left_side_unwrapped >= right_side_unwrapped {
|
||||||
Some(Ordering::Greater) | Some(Ordering::Equal) | None => self
|
return self.render_maybe_body(
|
||||||
.render_maybe_body(
|
¶meterized_block.contents,
|
||||||
¶meterized_block.contents,
|
breadcrumbs,
|
||||||
breadcrumbs,
|
blocks,
|
||||||
blocks,
|
);
|
||||||
),
|
} else {
|
||||||
Some(Ordering::Less) => self.render_maybe_body(
|
return self.render_maybe_body(
|
||||||
¶meterized_block.else_contents,
|
¶meterized_block.else_contents,
|
||||||
breadcrumbs,
|
breadcrumbs,
|
||||||
blocks,
|
blocks,
|
||||||
),
|
);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -415,19 +415,19 @@ impl<'a> DustRenderer<'a> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
(Ok(left_side_unwrapped), Ok(right_side_unwrapped)) => {
|
(Ok(left_side_unwrapped), Ok(right_side_unwrapped)) => {
|
||||||
return match left_side_unwrapped.partial_cmp(&right_side_unwrapped) {
|
if left_side_unwrapped <= right_side_unwrapped {
|
||||||
Some(Ordering::Less) | Some(Ordering::Equal) | None => self
|
return self.render_maybe_body(
|
||||||
.render_maybe_body(
|
¶meterized_block.contents,
|
||||||
¶meterized_block.contents,
|
breadcrumbs,
|
||||||
breadcrumbs,
|
blocks,
|
||||||
blocks,
|
);
|
||||||
),
|
} else {
|
||||||
Some(Ordering::Greater) => self.render_maybe_body(
|
return self.render_maybe_body(
|
||||||
¶meterized_block.else_contents,
|
¶meterized_block.else_contents,
|
||||||
breadcrumbs,
|
breadcrumbs,
|
||||||
blocks,
|
blocks,
|
||||||
),
|
);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user