Skip to content

Commit

Permalink
fix(gui): revert const for UiBuilder::style
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiDood committed Sep 1, 2024
1 parent fa1f6ac commit fae5fdd
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions crates/egui/src/ui_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,8 @@ impl UiBuilder {
///
/// Otherwise will inherit the style of the parent.
#[inline]
pub const fn const_style(mut self, style: Arc<Style>) -> Self {
self.style = Some(style);
pub fn style(mut self, style: impl Into<Arc<Style>>) -> Self {
self.style = Some(style.into());
self
}

/// See [`Self::const_style`].
#[inline]
pub fn style(self, style: impl Into<Arc<Style>>) -> Self {
let style = style.into();
self.const_style(style)
}
}

0 comments on commit fae5fdd

Please sign in to comment.