From aab924d976d2cd811296fe6dc0770a7fde3bbe87 Mon Sep 17 00:00:00 2001 From: German Lashevich Date: Sat, 16 Jun 2018 11:21:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Move=20struct=20definition=20to?= =?UTF-8?q?=20a=20proper=20place?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/databases/json.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/databases/json.rs b/src/databases/json.rs index 1cdf75b..4b768c6 100644 --- a/src/databases/json.rs +++ b/src/databases/json.rs @@ -14,6 +14,11 @@ use rand::{OsRng, Rng}; const DATABASE_VERSION: u8 = 1; +pub struct JsonDatabase { + file_path: PathBuf, + secret_fn: &'static Fn() -> String, +} + // Database implementation for JSON database impl Database for JsonDatabase { fn get_applications(&self) -> HashMap { @@ -39,11 +44,6 @@ struct DatabaseContentSchema { applications: HashMap, } -pub struct JsonDatabase { - file_path: PathBuf, - secret_fn: &'static Fn() -> String, -} - const IV_SIZE: usize = 16; const KEY_SIZE: usize = 32; impl JsonDatabase {