Simplify using ..
This commit is contained in:
@@ -584,7 +584,7 @@ fn main() {
|
||||
while let Err(err) = engine.run_ast_with_scope(&mut Scope::new(), &main_ast) {
|
||||
match *err {
|
||||
// Loop back to restart
|
||||
EvalAltResult::ErrorTerminated(_, _) => (),
|
||||
EvalAltResult::ErrorTerminated(..) => (),
|
||||
// Break evaluation
|
||||
_ => {
|
||||
print_error(&script, *err);
|
||||
|
@@ -489,7 +489,7 @@ fn main() {
|
||||
.iter()
|
||||
.rev()
|
||||
.enumerate()
|
||||
.find(|&(_, h)| h.contains(text))
|
||||
.find(|&(.., h)| h.contains(text))
|
||||
{
|
||||
replacement = Some(line.clone());
|
||||
replacement_index = history_offset + (rl.history().len() - 1 - n);
|
||||
@@ -514,7 +514,7 @@ fn main() {
|
||||
.iter()
|
||||
.rev()
|
||||
.enumerate()
|
||||
.find(|&(_, h)| h.trim_start().starts_with(prefix))
|
||||
.find(|&(.., h)| h.trim_start().starts_with(prefix))
|
||||
{
|
||||
replacement = Some(line.clone());
|
||||
replacement_index = history_offset + (rl.history().len() - 1 - n);
|
||||
|
Reference in New Issue
Block a user