From 945a6289d89b457a5ee4225d8ac0bc650ae67269 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 12 Apr 2022 14:19:24 -0400 Subject: [PATCH] use usize not i32 here --- src/function.rs | 2 +- src/math_app.rs | 2 +- src/widgets.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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();