diff --git a/src/function.rs b/src/function.rs index 78b5ef5..6d25459 100644 --- a/src/function.rs +++ b/src/function.rs @@ -97,7 +97,7 @@ impl Default for FunctionEntry { impl FunctionEntry { /// Create autocomplete ui and handle user input - pub fn auto_complete(&mut self, ui: &mut egui::Ui, i: i32) { + pub fn auto_complete(&mut self, ui: &mut egui::Ui, i: usize) { self.autocomplete.update_string(&self.raw_func_str); self.autocomplete.ui(ui, i); diff --git a/src/math_app.rs b/src/math_app.rs index 2ba47d7..993e26d 100644 --- a/src/math_app.rs +++ b/src/math_app.rs @@ -474,7 +474,7 @@ impl MathApp { ); // Contains the function string in a text box that the user can edit - function.auto_complete(ui, i as i32) + function.auto_complete(ui, i) }); function.settings(ctx); } diff --git a/src/widgets.rs b/src/widgets.rs index 345604d..9bd6ad5 100644 --- a/src/widgets.rs +++ b/src/widgets.rs @@ -80,7 +80,7 @@ impl<'a> AutoComplete<'a> { self.update_string(&new_string); } - pub fn ui(&mut self, ui: &mut egui::Ui, func_i: i32) { + pub fn ui(&mut self, ui: &mut egui::Ui, func_i: usize) { let mut movement: Movement = Movement::default(); let mut new_string = self.string.clone();