Switch todo!() to unreachable!/unimplemented! where it matters

This commit is contained in:
Jonathan Kelley committed 2024-01-31 16:26:20 -08:00
1 parent a14789eebc
commit 8f07d881a6
27 files changed
+73 -180

No files matched your search

+2 -2
View File
@@ -210,7 +210,7 @@ impl RinkWidget for NodeRef<'_> {
[1, -1] => [points_history[1][0], points_history[1][1] - 1],
[-1, 1] => [points_history[1][0], points_history[1][1] + 1],
[-1, -1] => [points_history[1][0] - 1, points_history[1][1]],
_ => todo!(),
_ => unreachable!(),
};
draw(
buf,
@@ -253,7 +253,7 @@ impl RinkWidget for NodeRef<'_> {
_ => match border.radius {
Dimension::Percent(p) => p * area.width as f32 / 100.0,
Dimension::Points(p) => p,
_ => todo!(),
_ => unreachable!(),
}
.abs()
.min((area.width as f32 / RADIUS_MULTIPLIER[0]) / 2.0)