Simplify using ..

This commit is contained in:
Stephen Chung
2022-02-08 09:02:15 +08:00
parent 187a20fd8b
commit f8cee0fe4e
54 changed files with 1184 additions and 1190 deletions

View File

@@ -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);