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:
@@ -150,29 +150,29 @@ impl Rect {
|
||||
rect
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn with_min_x(mut self, min_x: f32) -> Self {
|
||||
self.min.x = min_x;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn with_min_y(mut self, min_y: f32) -> Self {
|
||||
self.min.y = min_y;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn with_max_x(mut self, max_x: f32) -> Self {
|
||||
self.max.x = max_x;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn with_max_y(mut self, max_y: f32) -> Self {
|
||||
self.max.y = max_y;
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user