From 2fb59b3ae63e4351b3ee2be32cea834fc5076a18 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 21 Mar 2016 19:39:07 +0100 Subject: [PATCH] Remove unused imports --- libimagstore/src/configuration.rs | 1 - libimagstore/src/hook/aspect.rs | 4 ---- libimagstore/src/hook/mod.rs | 3 --- libimagstore/src/lazyfile.rs | 3 +-- libimagstore/src/store.rs | 9 +-------- 5 files changed, 2 insertions(+), 18 deletions(-) diff --git a/libimagstore/src/configuration.rs b/libimagstore/src/configuration.rs index 12b92161..67712d78 100644 --- a/libimagstore/src/configuration.rs +++ b/libimagstore/src/configuration.rs @@ -1,5 +1,4 @@ use toml::Value; -use hook::position::HookPosition; /// Check whether the configuration is valid for the store /// diff --git a/libimagstore/src/hook/aspect.rs b/libimagstore/src/hook/aspect.rs index c2cd6df9..6bf18fa7 100644 --- a/libimagstore/src/hook/aspect.rs +++ b/libimagstore/src/hook/aspect.rs @@ -39,8 +39,6 @@ impl Aspect { impl StoreIdAccessor for Aspect { fn access(&self, id: &StoreId) -> HookResult<()> { use crossbeam; - use std::thread; - use std::thread::JoinHandle; let accessors : Vec = self.hooks.iter().map(|h| h.accessor()).collect(); if !accessors.iter().all(|a| match a { &HDA::StoreIdAccess(_) => true, _ => false }) { @@ -108,8 +106,6 @@ impl MutableHookDataAccessor for Aspect { impl NonMutableHookDataAccessor for Aspect { fn access(&self, fle: &FileLockEntry) -> HookResult<()> { use crossbeam; - use std::thread; - use std::thread::JoinHandle; let accessors : Vec = self.hooks.iter().map(|h| h.accessor()).collect(); if !accessors.iter().all(|a| match a { &HDA::NonMutableAccess(_) => true, _ => false }) { diff --git a/libimagstore/src/hook/mod.rs b/libimagstore/src/hook/mod.rs index 57279ccb..96d5cfe6 100644 --- a/libimagstore/src/hook/mod.rs +++ b/libimagstore/src/hook/mod.rs @@ -2,9 +2,6 @@ use std::fmt::Debug; use toml::Value; -use self::error::HookError; -use store::FileLockEntry; - pub mod accessor; pub mod aspect; pub mod error; diff --git a/libimagstore/src/lazyfile.rs b/libimagstore/src/lazyfile.rs index 1983ef8b..59022905 100644 --- a/libimagstore/src/lazyfile.rs +++ b/libimagstore/src/lazyfile.rs @@ -107,9 +107,8 @@ impl LazyFile { #[cfg(test)] mod test { use super::LazyFile; - use std::io::{Read, Write, Seek, SeekFrom}; + use std::io::{Read, Write}; use std::path::PathBuf; - use std::fs::File; use tempdir::TempDir; fn get_dir() -> TempDir { diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 201386d5..401e8ca0 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -15,8 +15,6 @@ use std::ops::DerefMut; use toml::{Table, Value}; use regex::Regex; -use crossbeam; -use crossbeam::ScopedJoinHandle; use glob::glob; use error::{ParserErrorKind, ParserError}; @@ -25,12 +23,9 @@ use storeid::{StoreId, StoreIdIterator}; use lazyfile::LazyFile; use hook::aspect::Aspect; -use hook::result::HookResult; use hook::accessor::{ MutableHookDataAccessor, NonMutableHookDataAccessor, - StoreIdAccessor, - HookDataAccessor, - HookDataAccessorProvider}; + StoreIdAccessor}; use hook::position::HookPosition; use hook::Hook; @@ -1306,8 +1301,6 @@ mod test { #[test] fn test_verification_current_version() { - use version; - use super::verify_header_consistency; let mut header = BTreeMap::new();