mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Add #[inline] to all builder-pattern functions (#3557)
Better performance and maybe code size
This commit is contained in:
@@ -47,6 +47,7 @@ impl Size {
|
||||
}
|
||||
|
||||
/// Won't shrink below this size (in points).
|
||||
#[inline]
|
||||
pub fn at_least(mut self, minimum: f32) -> Self {
|
||||
match &mut self {
|
||||
Self::Absolute { range, .. }
|
||||
@@ -59,6 +60,7 @@ impl Size {
|
||||
}
|
||||
|
||||
/// Won't grow above this size (in points).
|
||||
#[inline]
|
||||
pub fn at_most(mut self, maximum: f32) -> Self {
|
||||
match &mut self {
|
||||
Self::Absolute { range, .. }
|
||||
|
||||
Reference in New Issue
Block a user