🎨 Move struct definition to a proper place

refactoring/split-modules
German Lashevich 7 years ago
parent a92d82a6c8
commit aab924d976
No known key found for this signature in database
GPG Key ID: 3446FAE369C9A8B4

@ -14,6 +14,11 @@ use rand::{OsRng, Rng};
const DATABASE_VERSION: u8 = 1; const DATABASE_VERSION: u8 = 1;
pub struct JsonDatabase {
file_path: PathBuf,
secret_fn: &'static Fn() -> String,
}
// Database implementation for JSON database // Database implementation for JSON database
impl Database for JsonDatabase { impl Database for JsonDatabase {
fn get_applications(&self) -> HashMap<String, TOTP> { fn get_applications(&self) -> HashMap<String, TOTP> {
@ -39,11 +44,6 @@ struct DatabaseContentSchema {
applications: HashMap<String, TOTP>, applications: HashMap<String, TOTP>,
} }
pub struct JsonDatabase {
file_path: PathBuf,
secret_fn: &'static Fn() -> String,
}
const IV_SIZE: usize = 16; const IV_SIZE: usize = 16;
const KEY_SIZE: usize = 32; const KEY_SIZE: usize = 32;
impl JsonDatabase { impl JsonDatabase {

Loading…
Cancel
Save