Format code and fix tests.

This commit is contained in:
Oleksandr Kozachuk
2022-12-14 16:22:04 +01:00
parent 0c187b7b5b
commit d13ed1129a
2 changed files with 127 additions and 13 deletions
+5 -2
View File
@@ -1,8 +1,8 @@
use home::home_dir;
use regex::Regex;
use rpassword::prompt_password;
use rustyline::error::ReadlineError;
use rustyline::Editor;
use regex::Regex;
use std::{cell::RefCell, rc::Rc};
use crate::lk::LK;
@@ -179,7 +179,10 @@ impl<'a> LKEval<'a> {
fn cmd_ls(&self, out: &mut Vec<String>, filter: String) {
let re = match Regex::new(&filter) {
Ok(re) => re,
Err(e) => { out.push(format!("error: failed to parse re: {:?}", e)); return; }
Err(e) => {
out.push(format!("error: failed to parse re: {:?}", e));
return;
}
};
let mut tmp: Vec<PasswordRef> = vec![];
for (_, name) in &self.state.borrow().db {