field is never read
This commit is contained in:
parent
e8f86631ce
commit
4494c4c201
@ -3,14 +3,6 @@ use eframe::{egui, epaint};
|
||||
use egui::{text::CCursor, text_edit::CursorRange, Key, Modifiers, TextEdit, Widget};
|
||||
use epaint::text::cursor::{Cursor, PCursor, RCursor};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct AutoComplete<'a> {
|
||||
pub i: usize,
|
||||
pub hint: &'a HintEnum<'a>,
|
||||
pub func_str: Option<String>,
|
||||
pub changed: bool,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
enum Movement {
|
||||
Complete,
|
||||
@ -19,6 +11,13 @@ enum Movement {
|
||||
None,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct AutoComplete<'a> {
|
||||
pub i: usize,
|
||||
pub hint: &'a HintEnum<'a>,
|
||||
pub func_str: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for Movement {
|
||||
fn default() -> Movement { Movement::None }
|
||||
}
|
||||
@ -29,7 +28,6 @@ impl<'a> Default for AutoComplete<'a> {
|
||||
i: 0,
|
||||
hint: &HintEnum::None,
|
||||
func_str: None,
|
||||
changed: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -38,11 +36,8 @@ impl<'a> AutoComplete<'a> {
|
||||
fn changed(&mut self, string: &str) {
|
||||
let new_func_str = Some(string.to_string());
|
||||
if self.func_str != new_func_str {
|
||||
self.changed = true;
|
||||
self.func_str = new_func_str;
|
||||
self.hint = generate_hint(string);
|
||||
} else {
|
||||
self.changed = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user