use usize not i32 here

This commit is contained in:
Simon Gardling 2022-04-12 14:19:24 -04:00
parent 36e31fdbc7
commit 945a6289d8
3 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,7 @@ impl Default for FunctionEntry {
impl FunctionEntry { impl FunctionEntry {
/// Create autocomplete ui and handle user input /// 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.update_string(&self.raw_func_str);
self.autocomplete.ui(ui, i); self.autocomplete.ui(ui, i);

View File

@ -474,7 +474,7 @@ impl MathApp {
); );
// Contains the function string in a text box that the user can edit // 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); function.settings(ctx);
} }

View File

@ -80,7 +80,7 @@ impl<'a> AutoComplete<'a> {
self.update_string(&new_string); 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 movement: Movement = Movement::default();
let mut new_string = self.string.clone(); let mut new_string = self.string.clone();