diff --git a/crates/egui/src/containers/combo_box.rs b/crates/egui/src/containers/combo_box.rs index 8ede4d670a9..1e0321cd30b 100644 --- a/crates/egui/src/containers/combo_box.rs +++ b/crates/egui/src/containers/combo_box.rs @@ -198,16 +198,16 @@ impl ComboBox { /// ui, /// &mut selected, /// alternatives.len(), - /// |i| alternatives[i].to_owned() + /// |i| alternatives[i] /// ); /// # }); /// ``` - pub fn show_index( + pub fn show_index>( self, ui: &mut Ui, selected: &mut usize, len: usize, - get: impl Fn(usize) -> String, + get: impl Fn(usize) -> Text, ) -> Response { let slf = self.selected_text(get(*selected));