Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Impl from Box<str> for WidgetText, RichText (#5309)
`Box<str>` is an immutable heap-allocated string slice. This PR makes it more convenient to use them in labels for example. Before this PR ```rust let text: Box<str> = "Hello".into(); ui.label(text.into_string()); let text_ref: &Box<str> = &"Hello".into(); ui.label(text_ref.clone().into_string()); // or ui.label(text_ref.as_ref()); // or ui.label(&**text_ref); ``` After this PR ```rust let text: Box<str> = "Hello".into(); ui.label(text); let text_ref: &Box<str> = &"Hello".into(); ui.label(text_ref); ``` * [x] I have followed the instructions in the PR template
- Loading branch information