From 5ccc71415ec76647d7176724c7d1ca8bf8bf7851 Mon Sep 17 00:00:00 2001 From: Brian Janssen Date: Wed, 29 Mar 2023 17:00:31 +0200 Subject: [PATCH] Replace show_index String with Into (#2790) --- crates/egui/src/containers/combo_box.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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));