Removed warnings
This commit is contained in:
10
src/lib.rs
10
src/lib.rs
@ -236,12 +236,6 @@ pub mod shell {
|
||||
let mut current_pos: usize = 0;
|
||||
let mut max_pos: usize = 0;
|
||||
|
||||
//Used to keep the result of the last autocomplete
|
||||
//Next time we press tab we get a different result so that we can
|
||||
//rotate between files in the dir for example
|
||||
//Resetted by pressing enter
|
||||
let mut prev_autocomplete = String::new();
|
||||
|
||||
//Initialize
|
||||
write!(stdout, "\r\n SquiShell (sqish)--- \r\n{}", prompt);
|
||||
stdout.flush();
|
||||
@ -255,8 +249,7 @@ pub mod shell {
|
||||
continue;
|
||||
}
|
||||
//Search
|
||||
let (res, list) = autocomplete(&mycommand, &prev_autocomplete);
|
||||
*&mut prev_autocomplete = String::from(res.as_str());
|
||||
let (res, list) = autocomplete(&mycommand);
|
||||
write!(stdout, "\r\n{}\r\n", list);
|
||||
mycommand.clear();
|
||||
mycommand.push_str(&res);
|
||||
@ -267,7 +260,6 @@ pub mod shell {
|
||||
}
|
||||
|
||||
Key::Char('\n') => {
|
||||
*&mut prev_autocomplete = String::new();
|
||||
current_number = get_curr_history_number();
|
||||
prompt = build_prompt(¤t_number);
|
||||
current_pos = 0;
|
||||
|
||||
Reference in New Issue
Block a user