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
This commit is contained in:
parent
13abb1fc16
commit
6993f3cfe3
@ -338,7 +338,7 @@ impl Size {
|
||||
/// assert_eq!(size.width, Val::Px(100.0));
|
||||
/// assert_eq!(size.height, Val::Px(200.0));
|
||||
/// ```
|
||||
pub fn new(width: Val, height: Val) -> Self {
|
||||
pub const fn new(width: Val, height: Val) -> Self {
|
||||
Size { width, height }
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user