1
0
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:
Emil Ernerfeldt
2023-11-16 13:50:05 +01:00
committed by GitHub
parent 4886c8c8c0
commit a243180600
32 changed files with 398 additions and 35 deletions

View File

@@ -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