Remove unused imports
This commit is contained in:
parent
1f8bdef1ed
commit
230d00f35a
9 changed files with 8 additions and 24 deletions
|
@ -15,8 +15,6 @@ pub struct Configuration {
|
||||||
impl Configuration {
|
impl Configuration {
|
||||||
|
|
||||||
pub fn new(config: &CliConfig) -> Configuration {
|
pub fn new(config: &CliConfig) -> Configuration {
|
||||||
use std::env::home_dir;
|
|
||||||
|
|
||||||
let rtp = rtp_path(config).or(default_path());
|
let rtp = rtp_path(config).or(default_path());
|
||||||
|
|
||||||
let mut verbose = false;
|
let mut verbose = false;
|
||||||
|
|
|
@ -6,10 +6,10 @@ use regex::Regex;
|
||||||
use module::{CommandEnv, CommandResult, Module, ModuleError};
|
use module::{CommandEnv, CommandResult, Module, ModuleError};
|
||||||
use module::bm::header::{build_header, get_tags_from_header};
|
use module::bm::header::{build_header, get_tags_from_header};
|
||||||
use runtime::Runtime;
|
use runtime::Runtime;
|
||||||
use storage::backend::{StorageBackendError, StorageBackend};
|
use storage::backend::StorageBackendError;
|
||||||
use storage::file::File;
|
use storage::file::File;
|
||||||
use storage::json::parser::JsonHeaderParser;
|
use storage::json::parser::JsonHeaderParser;
|
||||||
use storage::parser::{Parser, FileHeaderParser};
|
use storage::parser::Parser;
|
||||||
use ui::file::{FilePrinter, TablePrinter};
|
use ui::file::{FilePrinter, TablePrinter};
|
||||||
|
|
||||||
pub fn add_command(module: &Module, env: CommandEnv) -> CommandResult {
|
pub fn add_command(module: &Module, env: CommandEnv) -> CommandResult {
|
||||||
|
|
|
@ -3,18 +3,10 @@ mod commands;
|
||||||
|
|
||||||
use std::fmt::{Debug, Formatter};
|
use std::fmt::{Debug, Formatter};
|
||||||
use std::fmt::Result as FMTResult;
|
use std::fmt::Result as FMTResult;
|
||||||
use std::path::Path;
|
|
||||||
use std::result::Result;
|
|
||||||
|
|
||||||
use clap::ArgMatches;
|
use module::{CommandMap, Module, ModuleResult};
|
||||||
use regex::Regex;
|
|
||||||
|
|
||||||
use module::{CommandMap, Module, ModuleError, ModuleResult};
|
|
||||||
use runtime::Runtime;
|
use runtime::Runtime;
|
||||||
use self::commands::*;
|
use self::commands::*;
|
||||||
use self::header::build_header;
|
|
||||||
use storage::json::parser::JsonHeaderParser;
|
|
||||||
use storage::parser::FileHeaderParser;
|
|
||||||
|
|
||||||
pub struct BMModule {
|
pub struct BMModule {
|
||||||
path: Option<String>,
|
path: Option<String>,
|
||||||
|
|
|
@ -2,13 +2,12 @@ use std::collections::HashMap;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
use std::fmt::{Debug, Display, Formatter};
|
||||||
use std::fmt::Result as FMTResult;
|
use std::fmt::Result as FMTResult;
|
||||||
use std::path::Path;
|
|
||||||
use std::result::Result;
|
use std::result::Result;
|
||||||
|
|
||||||
use clap::{App, ArgMatches};
|
use clap::ArgMatches;
|
||||||
|
|
||||||
use runtime::Runtime;
|
use runtime::Runtime;
|
||||||
use storage::backend::{StorageBackend, StorageBackendError};
|
use storage::backend::StorageBackend;
|
||||||
|
|
||||||
pub mod bm;
|
pub mod bm;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ use std::fmt::Result as FMTResult;
|
||||||
use std::fs::File as FSFile;
|
use std::fs::File as FSFile;
|
||||||
use std::fs::{create_dir_all, remove_file};
|
use std::fs::{create_dir_all, remove_file};
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use std::path::{Path, PathBuf};
|
|
||||||
use std::vec::{Vec, IntoIter};
|
use std::vec::{Vec, IntoIter};
|
||||||
|
|
||||||
use glob::glob;
|
use glob::glob;
|
||||||
|
@ -14,7 +13,7 @@ use module::Module;
|
||||||
use runtime::Runtime;
|
use runtime::Runtime;
|
||||||
use storage::file::File;
|
use storage::file::File;
|
||||||
use storage::file_id::*;
|
use storage::file_id::*;
|
||||||
use storage::parser::{FileHeaderParser, Parser, ParserError};
|
use storage::parser::{FileHeaderParser, Parser};
|
||||||
|
|
||||||
pub type BackendOperationResult<T = ()> = Result<T, StorageBackendError>;
|
pub type BackendOperationResult<T = ()> = Result<T, StorageBackendError>;
|
||||||
|
|
||||||
|
@ -178,8 +177,6 @@ impl StorageBackend {
|
||||||
pub fn get_file_by_id<'a, HP>(&self, m: &'a Module, id: &FileID, p: &Parser<HP>) -> Option<File<'a>>
|
pub fn get_file_by_id<'a, HP>(&self, m: &'a Module, id: &FileID, p: &Parser<HP>) -> Option<File<'a>>
|
||||||
where HP: FileHeaderParser
|
where HP: FileHeaderParser
|
||||||
{
|
{
|
||||||
use std::ops::Index;
|
|
||||||
|
|
||||||
debug!("Searching for file with id '{}'", id);
|
debug!("Searching for file with id '{}'", id);
|
||||||
|
|
||||||
if id.get_type() == FileIDType::NONE {
|
if id.get_type() == FileIDType::NONE {
|
||||||
|
|
|
@ -2,7 +2,7 @@ use std::convert::{From, Into};
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
use std::fmt::{Debug, Display, Formatter};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::PathBuf;
|
||||||
use std::result::Result;
|
use std::result::Result;
|
||||||
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::io::stdout;
|
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
|
|
||||||
use serde_json::{Value, from_str};
|
use serde_json::{Value, from_str};
|
||||||
|
|
|
@ -4,7 +4,7 @@ use std::fmt;
|
||||||
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
|
||||||
use super::file::{FileHeaderSpec, FileHeaderData};
|
use super::file::FileHeaderData;
|
||||||
|
|
||||||
pub struct ParserError {
|
pub struct ParserError {
|
||||||
summary: String,
|
summary: String,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use std::iter::Iterator;
|
use std::iter::Iterator;
|
||||||
|
|
||||||
use runtime::Runtime;
|
|
||||||
use storage::file::File;
|
use storage::file::File;
|
||||||
|
|
||||||
pub trait FilePrinter {
|
pub trait FilePrinter {
|
||||||
|
|
Loading…
Reference in a new issue