diff --git a/src/widgets/toplevels.rs b/src/widgets/toplevels.rs index cb01405..c8e393b 100644 --- a/src/widgets/toplevels.rs +++ b/src/widgets/toplevels.rs @@ -74,7 +74,7 @@ impl<'a, Msg> Widget for Toplevels<'a, Msg> { let spacing = 16; // Get total requested main axis length if widget could have all the space - let total_spacing = spacing * (self.children.len() - 1).max(0); + let total_spacing = spacing * (self.children.len().saturating_sub(1)).max(0); let requested_mains = self .children .iter()