Remove unused imports
This commit is contained in:
parent
708f2bcff1
commit
a2856d8671
12 changed files with 7 additions and 52 deletions
|
@ -9,8 +9,6 @@
|
||||||
extern crate url;
|
extern crate url;
|
||||||
extern crate config;
|
extern crate config;
|
||||||
|
|
||||||
use std::process::exit;
|
|
||||||
|
|
||||||
pub use cli::CliConfig;
|
pub use cli::CliConfig;
|
||||||
pub use configuration::Configuration;
|
pub use configuration::Configuration;
|
||||||
pub use runtime::{ImagLogger, Runtime};
|
pub use runtime::{ImagLogger, Runtime};
|
||||||
|
|
|
@ -1,20 +1,13 @@
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
use std::fmt::{Debug, Formatter};
|
||||||
use std::rc::Rc;
|
|
||||||
use std::cell::RefCell;
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
||||||
use clap::ArgMatches;
|
use clap::ArgMatches;
|
||||||
use regex::Regex;
|
|
||||||
|
|
||||||
use runtime::Runtime;
|
use runtime::Runtime;
|
||||||
use module::Module;
|
use module::Module;
|
||||||
|
|
||||||
use storage::Store;
|
|
||||||
use storage::file::hash::FileHash;
|
|
||||||
use storage::file::id::FileID;
|
|
||||||
use storage::file::File;
|
|
||||||
use storage::parser::FileHeaderParser;
|
use storage::parser::FileHeaderParser;
|
||||||
use storage::parser::Parser;
|
use storage::parser::Parser;
|
||||||
use storage::json::parser::JsonHeaderParser;
|
use storage::json::parser::JsonHeaderParser;
|
||||||
|
@ -142,8 +135,6 @@ impl<'a> BM<'a> {
|
||||||
* Subcommand: remove
|
* Subcommand: remove
|
||||||
*/
|
*/
|
||||||
fn command_remove(&self, matches: &ArgMatches) -> bool {
|
fn command_remove(&self, matches: &ArgMatches) -> bool {
|
||||||
use std::process::exit;
|
|
||||||
|
|
||||||
let parser = Parser::new(JsonHeaderParser::new(None));
|
let parser = Parser::new(JsonHeaderParser::new(None));
|
||||||
let filter : Box<CliFileFilter> = get_file_filter_by_cli(&parser, matches, "id", "match", "tags", None);
|
let filter : Box<CliFileFilter> = get_file_filter_by_cli(&parser, matches, "id", "match", "tags", None);
|
||||||
let result = self.rt
|
let result = self.rt
|
||||||
|
|
|
@ -8,8 +8,6 @@ use regex::Regex;
|
||||||
|
|
||||||
use storage::file::File;
|
use storage::file::File;
|
||||||
use storage::file::hash::FileHash;
|
use storage::file::hash::FileHash;
|
||||||
use storage::file::header::data::FileHeaderData;
|
|
||||||
use storage::file::id::FileID;
|
|
||||||
use storage::json::parser::JsonHeaderParser;
|
use storage::json::parser::JsonHeaderParser;
|
||||||
use storage::parser::FileHeaderParser;
|
use storage::parser::FileHeaderParser;
|
||||||
use storage::parser::Parser;
|
use storage::parser::Parser;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
*/
|
*/
|
||||||
pub mod cli {
|
pub mod cli {
|
||||||
use clap::ArgMatches;
|
use clap::ArgMatches;
|
||||||
use regex::Regex;
|
|
||||||
|
|
||||||
use runtime::Runtime;
|
use runtime::Runtime;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
use std::collections::HashMap;
|
use std::fmt::Debug;
|
||||||
use std::error::Error;
|
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
|
||||||
use std::fmt::Result as FMTResult;
|
|
||||||
use std::result::Result;
|
|
||||||
|
|
||||||
use clap::ArgMatches;
|
use clap::ArgMatches;
|
||||||
|
|
||||||
use runtime::Runtime;
|
|
||||||
|
|
||||||
pub mod bm;
|
pub mod bm;
|
||||||
pub mod helpers;
|
pub mod helpers;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use std::convert::{From, Into};
|
use std::convert::{From, Into};
|
||||||
use std::error::Error;
|
use std::fmt::{Display, Formatter};
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
use std::fmt::{Display, Formatter};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
use std::convert::{From, Into};
|
use std::convert::{From, Into};
|
||||||
use std::error::Error;
|
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
use std::fmt::{Debug, Display, Formatter};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::Hash;
|
|
||||||
use std::path::PathBuf;
|
|
||||||
use std::result::Result;
|
use std::result::Result;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
use std::convert::{From, Into};
|
use std::convert::{From, Into};
|
||||||
use std::error::Error;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::hash::Hash;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use std::error::Error;
|
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
use std::fmt::{Debug, Display, Formatter};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
@ -9,14 +8,7 @@ pub mod id_type;
|
||||||
pub mod header;
|
pub mod header;
|
||||||
pub mod hash;
|
pub mod hash;
|
||||||
|
|
||||||
|
|
||||||
use module::Module;
|
|
||||||
use storage::file::id::*;
|
use storage::file::id::*;
|
||||||
use storage::file::id_type::FileIDType;
|
|
||||||
use storage::file::hash::FileHash;
|
|
||||||
use super::parser::{FileHeaderParser, Parser, ParserError};
|
|
||||||
|
|
||||||
use self::header::spec::*;
|
|
||||||
use self::header::data::*;
|
use self::header::data::*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,12 +12,11 @@ pub mod parser;
|
||||||
pub mod json;
|
pub mod json;
|
||||||
|
|
||||||
use module::Module;
|
use module::Module;
|
||||||
use runtime::Runtime;
|
|
||||||
use storage::file::File;
|
use storage::file::File;
|
||||||
use storage::file::id::FileID;
|
use storage::file::id::FileID;
|
||||||
use storage::file::id_type::FileIDType;
|
use storage::file::id_type::FileIDType;
|
||||||
use storage::file::hash::FileHash;
|
use storage::file::hash::FileHash;
|
||||||
use storage::parser::{FileHeaderParser, Parser, ParserError};
|
use storage::parser::{FileHeaderParser, Parser};
|
||||||
use storage::file::header::data::FileHeaderData;
|
use storage::file::header::data::FileHeaderData;
|
||||||
|
|
||||||
type Cache = HashMap<FileID, Rc<RefCell<File>>>;
|
type Cache = HashMap<FileID, Rc<RefCell<File>>>;
|
||||||
|
@ -261,7 +260,7 @@ impl Store {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
use glob::{glob, Paths, PatternError};
|
use glob::glob;
|
||||||
|
|
||||||
let hashstr : String = hash.into();
|
let hashstr : String = hash.into();
|
||||||
let globstr = format!("{}/*-{}.imag", self.storepath, hashstr);
|
let globstr = format!("{}/*-{}.imag", self.storepath, hashstr);
|
||||||
|
@ -323,7 +322,7 @@ impl Store {
|
||||||
-> Vec<Rc<RefCell<File>>>
|
-> Vec<Rc<RefCell<File>>>
|
||||||
where HP: FileHeaderParser
|
where HP: FileHeaderParser
|
||||||
{
|
{
|
||||||
use glob::{glob, Paths, PatternError};
|
use glob::glob;
|
||||||
|
|
||||||
let globstr = format!("{}/{}-*.imag", self.storepath, m.name());
|
let globstr = format!("{}/{}-*.imag", self.storepath, m.name());
|
||||||
let mut res = vec![];
|
let mut res = vec![];
|
||||||
|
|
10
src/ui/external/editor.rs
vendored
10
src/ui/external/editor.rs
vendored
|
@ -1,12 +1,3 @@
|
||||||
use std::ops::Drop;
|
|
||||||
|
|
||||||
use std::path::PathBuf;
|
|
||||||
use std::fs::File;
|
|
||||||
use std::error::Error;
|
|
||||||
|
|
||||||
use std::fmt::{Debug, Display, Formatter};
|
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
use runtime::Runtime;
|
use runtime::Runtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +8,6 @@ pub fn let_user_provide_content(rt: &Runtime) -> Option<String> {
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::process::Child;
|
|
||||||
|
|
||||||
let filepath = "/tmp/imag-tmp.md";
|
let filepath = "/tmp/imag-tmp.md";
|
||||||
let file_created = File::create(filepath)
|
let file_created = File::create(filepath)
|
||||||
|
|
Loading…
Reference in a new issue