From 8814c6ef14d9d2997dde2025ca96605edef8a3fa Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Thu, 28 Jul 2022 14:42:51 +0300 Subject: [PATCH] chore: cleanup unused imports --- src/std/bool.rs | 4 ++-- src/std/number.rs | 4 ++-- src/std/option.rs | 6 +++--- src/structs/pair.rs | 2 +- src/structs/sep_vec.rs | 7 ++++--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/std/bool.rs b/src/std/bool.rs index bf01286..3638ccf 100644 --- a/src/std/bool.rs +++ b/src/std/bool.rs @@ -1,4 +1,4 @@ -use crate::core::{Aggregatable, EString, ParseFragment, ToEString}; +use crate::core::{EString, ParseFragment, ToEString}; use crate::error::{Error, Reason}; impl ParseFragment for bool { @@ -20,7 +20,7 @@ impl ToEString for bool { } #[cfg(feature = "aggs")] -impl Aggregatable for bool { +impl crate::core::Aggregatable for bool { type Item = Self; #[inline] diff --git a/src/std/number.rs b/src/std/number.rs index 63f8f66..5a55841 100644 --- a/src/std/number.rs +++ b/src/std/number.rs @@ -1,4 +1,4 @@ -use crate::core::{Aggregatable, EString, ParseFragment, ToEString}; +use crate::core::{EString, ParseFragment, ToEString}; use crate::error::{Error, Reason}; #[doc(hidden)] @@ -20,7 +20,7 @@ macro_rules! from_env_string_numbers_impl { } #[cfg(feature = "aggs")] - impl Aggregatable for $ty { + impl crate::core::Aggregatable for $ty { type Item = Self; #[inline] diff --git a/src/std/option.rs b/src/std/option.rs index 931ab66..23c6009 100644 --- a/src/std/option.rs +++ b/src/std/option.rs @@ -1,4 +1,4 @@ -use crate::core::{Aggregatable, EString, ParseFragment, ToEString}; +use crate::core::{EString, ParseFragment, ToEString}; impl ToEString for Option where @@ -26,9 +26,9 @@ where } #[cfg(feature = "aggs")] -impl Aggregatable for Option +impl crate::core::Aggregatable for Option where - T: Aggregatable, + T: crate::core::Aggregatable, { type Item = T::Item; diff --git a/src/structs/pair.rs b/src/structs/pair.rs index 18e2bb6..b8ff269 100644 --- a/src/structs/pair.rs +++ b/src/structs/pair.rs @@ -118,7 +118,7 @@ hello=bar", #[test] fn should_format_pair() { let pair = Pair::<_, '+', _>(1, 2); - assert_eq!(pair.clone().to_estring(), EString(String::from("1+2"))); + assert_eq!(pair.to_estring(), EString(String::from("1+2"))); let pair_in_pair = Pair::<_, '=', _>(3, pair); assert_eq!(pair_in_pair.to_estring(), EString(String::from("3=1+2"))); } diff --git a/src/structs/sep_vec.rs b/src/structs/sep_vec.rs index 9413ad2..3d3faf5 100644 --- a/src/structs/sep_vec.rs +++ b/src/structs/sep_vec.rs @@ -1,7 +1,7 @@ //! Contains the implementations to vec type //! -use crate::core::{Aggregatable, EString, ParseFragment, ToEString}; +use crate::core::{EString, ParseFragment, ToEString}; use std::fmt::Write; /// Wrapper for ``Vec`` to split string by a separator (`SEP`). @@ -93,9 +93,9 @@ where } #[cfg(feature = "aggs")] -impl Aggregatable for SepVec +impl crate::core::Aggregatable for SepVec where - T: Aggregatable, + T: crate::core::Aggregatable, { type Item = T::Item; @@ -107,6 +107,7 @@ where #[cfg(test)] mod tests { use super::*; + use crate::Aggregatable; use crate::Pair; use crate::{Error, Reason};