Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
anssip committed Jul 17, 2024
1 parent 68e2d93 commit 6780e3e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
20 changes: 0 additions & 20 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ use rustyline::validate::Validator;
use rustyline::{Config, DefaultEditor, Editor, Result as RustylineResult};
use rustyline_derive::Helper;

use std::io::{self};

use crate::vault::entities::{Address, Credential, Expiry, Note, PaymentCard, Totp};
use std::cmp::min;

Expand Down Expand Up @@ -163,24 +161,6 @@ pub fn ask_with_initial_optional(
return None;
}

pub fn ask_multiline(question: &str) -> String {
// read multiple lines from stdin
println!("{} (press Ctrl+D when done)", question);
let mut buffer = String::new();
loop {
let mut line = String::new();
match io::stdin().read_line(&mut line) {
Ok(0) => break,
Ok(_) => buffer.push_str(&line),
Err(error) => {
println!("error: {}", error);
break;
}
}
}
buffer.trim().to_string()
}

pub fn ask_password(question: &str) -> String {
match rpassword::prompt_password(format!("{}: ", question)) {
Ok(password) => password,
Expand Down
14 changes: 0 additions & 14 deletions src/vault/keepass_vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,20 +419,6 @@ impl KeepassVault {
}
}

fn find_node_by_uuid(&self, uuid: &Uuid) -> Option<NodePtr> {
let root = self.get_root();
let mut stack = vec![root];
while let Some(node) = stack.pop() {
if node.borrow().get_uuid() == *uuid {
return Some(node);
}
if node_is_group(&node) {
stack.extend(group_get_children(&node).unwrap());
}
}
None
}

fn create_password_entry(
&mut self,
parent_uuid: &Uuid,
Expand Down

0 comments on commit 6780e3e

Please sign in to comment.