Skip to content

Commit 6993f3c

Browse files
committed
Make function Size::new const for bevy_ui widgets (#6602)
# Objective Fixes #6594 ## Solution - `New` function for `Size` is now a `const` function :) ## Changelog - `New` function for `Size` is now a `const` function ## Migration Guide - Nothing has been changed
1 parent 13abb1f commit 6993f3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_ui/src/geometry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ impl Size {
338338
/// assert_eq!(size.width, Val::Px(100.0));
339339
/// assert_eq!(size.height, Val::Px(200.0));
340340
/// ```
341-
pub fn new(width: Val, height: Val) -> Self {
341+
pub const fn new(width: Val, height: Val) -> Self {
342342
Size { width, height }
343343
}
344344

0 commit comments

Comments
 (0)