From b90d10a6cfae1fee7b184d931252de9ef2cffd2e Mon Sep 17 00:00:00 2001 From: Drew Short Date: Fri, 23 Aug 2019 00:44:58 -0500 Subject: [PATCH] cleanup imports --- src/hash/ahash.rs | 5 +---- src/hash/dhash.rs | 4 +--- src/hash/phash.rs | 6 +----- src/lib.rs | 1 - 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/hash/ahash.rs b/src/hash/ahash.rs index 7da57ce..e8f8c29 100644 --- a/src/hash/ahash.rs +++ b/src/hash/ahash.rs @@ -2,9 +2,6 @@ // // Licensed under the MIT license. // This file may not be copied, modified, or distributed except according to those terms. - -extern crate image; - use std::path::Path; use cache::Cache; @@ -12,7 +9,7 @@ use cache::Cache; use super::prepare_image; use super::{HashType, PerceptualHash, Precision, PreparedImage}; -use self::image::GenericImageView; +use super::image::GenericImageView; pub struct AHash<'a> { prepared_image: Box>, diff --git a/src/hash/dhash.rs b/src/hash/dhash.rs index c322928..e7ea637 100644 --- a/src/hash/dhash.rs +++ b/src/hash/dhash.rs @@ -2,8 +2,6 @@ // // Licensed under the MIT license. // This file may not be copied, modified, or distributed except according to those terms. -extern crate image; - use std::path::Path; use cache::Cache; @@ -11,7 +9,7 @@ use cache::Cache; use super::prepare_image; use super::{HashType, PerceptualHash, Precision, PreparedImage}; -use self::image::GenericImageView; +use super::image::GenericImageView; pub struct DHash<'a> { prepared_image: Box>, diff --git a/src/hash/phash.rs b/src/hash/phash.rs index 487dbfc..b05337d 100644 --- a/src/hash/phash.rs +++ b/src/hash/phash.rs @@ -2,20 +2,16 @@ // // Licensed under the MIT license. // This file may not be copied, modified, or distributed except according to those terms. -extern crate image; - use std::path::Path; use cache::Cache; use super::dft; use super::dft::Transform; -use super::image::Pixel; +use super::image::{DynamicImage, GenericImageView, Pixel}; use super::prepare_image; use super::{HashType, PerceptualHash, Precision, PreparedImage}; -use self::image::{DynamicImage, GenericImageView}; - pub struct PHash<'a> { prepared_image: Box>, } diff --git a/src/lib.rs b/src/lib.rs index 1788676..36da68e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,6 @@ // Enable nightly features for extra testing behind the bench feature #![cfg_attr(feature = "bench", feature(test))] -extern crate image; extern crate libc; extern crate rustc_serialize; #[cfg(feature = "bench")]