mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 23:13:13 -04:00
`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