Skip to content

Commit df08d60

Browse files
committed
lint
1 parent 823895c commit df08d60

File tree

12 files changed

+21
-20
lines changed

12 files changed

+21
-20
lines changed

src/config/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1+
pub mod app;
12
pub mod database;
2-
pub mod app;

src/database/repository.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use rusqlite::Connection;
33
use super::store::KvStore;
44
use crate::errors::database::DatabaseError;
55

6-
76
#[allow(dead_code)]
87
pub trait KvRepositoryTrait {
98
fn new(connection: Connection) -> Self;

src/database/store.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ impl KvStore {
3333

3434
// pub fn stored_data_handler() {}
3535
pub fn _run_store_tui() -> Result<(), DatabaseError> {
36-
let _security_questions = ["What is your mother's maiden name?",
36+
let _security_questions = [
37+
"What is your mother's maiden name?",
3738
"What is the name of your first pet?",
3839
"What city were you born in?",
3940
"What is your favorite movie?",
@@ -42,7 +43,8 @@ pub fn _run_store_tui() -> Result<(), DatabaseError> {
4243
"What is your favorite book?",
4344
"What is your favorite food?",
4445
"What is the model of your first car?",
45-
"What is your favorite color?"];
46+
"What is your favorite color?",
47+
];
4648
// let connection = Connection::open(&Path::new(DATABASE_PATH.as_str()))
4749
// .map_err(|err| DatabaseError::OperationFailed(err.to_string()))?;
4850

src/errors/file_system.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use thiserror::Error;
21
use confy::ConfyError;
2+
use thiserror::Error;
33

44
#[derive(Error, Debug)]
55
pub enum FileSystemError {
@@ -8,5 +8,5 @@ pub enum FileSystemError {
88
#[error(transparent)]
99
IoError(#[from] std::io::Error),
1010
#[error(transparent)]
11-
ConfyError(#[from] ConfyError)
11+
ConfyError(#[from] ConfyError),
1212
}

src/helpers/input.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src/helpers/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pub mod console;
22
pub mod file_system;
3+
pub mod input;
34
pub mod parser;
4-
pub mod input;

src/helpers/parser.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ pub fn extract_command_argument<T>(
77
where
88
T: Clone + Sync + Send + 'static,
99
{
10-
command_arguments.get_one::<T>(field_name).map(|value| value.to_owned())
10+
command_arguments
11+
.get_one::<T>(field_name)
12+
.map(|value| value.to_owned())
1113
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use lib_toolbox::{
1111

1212
fn main() -> Result<(), AppError> {
1313
let matches = Command::new("toolbox")
14-
.display_name("Dev toolbox")
14+
.display_name("Dev toolbox")
1515
.about("lightweight extensible, command line toolchain for software builders")
1616
.subcommand_required(true)
1717
.arg_required_else_help(true)

src/parsers/scripts.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
use std::{
2-
fs,
3-
path::Path,
4-
};
1+
use std::{fs, path::Path};
52

63
use clap::ArgMatches;
74

85
use crate::{
9-
constants::APP_RUNTIME_SCRIPTS_DIR, helpers::console::LogMessage,
6+
constants::APP_RUNTIME_SCRIPTS_DIR,
7+
helpers::console::LogMessage,
108
workers::scripts::{configure_scripts, execute_custom_script},
119
};
1210

src/parsers/store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use clap::ArgMatches;
44
use rusqlite::Connection;
55

66
use crate::{
7-
workers::store::StoreConfig,
87
helpers::{console::LogMessage, parser::extract_command_argument},
8+
workers::store::StoreConfig,
99
};
1010

1111
pub fn parse_store_options(sub_matches: &ArgMatches, database_connection: Connection) {

0 commit comments

Comments
 (0)