minor reductions
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
1c0ed91f6f
commit
98d96b89a5
2 changed files with 23 additions and 18 deletions
|
@ -167,10 +167,16 @@ impl Console {
|
|||
}
|
||||
|
||||
fn set_history(&self, readline: &mut Readline) {
|
||||
let history = self.history.lock().expect("locked");
|
||||
for entry in history.iter().rev() {
|
||||
readline.add_history_entry(entry.clone());
|
||||
}
|
||||
self.history
|
||||
.lock()
|
||||
.expect("locked")
|
||||
.iter()
|
||||
.rev()
|
||||
.for_each(|entry| {
|
||||
readline
|
||||
.add_history_entry(entry.clone())
|
||||
.expect("added history entry");
|
||||
});
|
||||
}
|
||||
|
||||
fn add_history(&self, line: String) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue