chore: cleanup unused imports

This commit is contained in:
Dmitriy Pleshevskiy 2022-07-28 14:42:51 +03:00
parent 81202b9d57
commit 8814c6ef14
Signed by: pleshevskiy
GPG Key ID: 1B59187B161C0215
5 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,4 @@
use crate::core::{Aggregatable, EString, ParseFragment, ToEString}; use crate::core::{EString, ParseFragment, ToEString};
use crate::error::{Error, Reason}; use crate::error::{Error, Reason};
impl ParseFragment for bool { impl ParseFragment for bool {
@ -20,7 +20,7 @@ impl ToEString for bool {
} }
#[cfg(feature = "aggs")] #[cfg(feature = "aggs")]
impl Aggregatable for bool { impl crate::core::Aggregatable for bool {
type Item = Self; type Item = Self;
#[inline] #[inline]

View File

@ -1,4 +1,4 @@
use crate::core::{Aggregatable, EString, ParseFragment, ToEString}; use crate::core::{EString, ParseFragment, ToEString};
use crate::error::{Error, Reason}; use crate::error::{Error, Reason};
#[doc(hidden)] #[doc(hidden)]
@ -20,7 +20,7 @@ macro_rules! from_env_string_numbers_impl {
} }
#[cfg(feature = "aggs")] #[cfg(feature = "aggs")]
impl Aggregatable for $ty { impl crate::core::Aggregatable for $ty {
type Item = Self; type Item = Self;
#[inline] #[inline]

View File

@ -1,4 +1,4 @@
use crate::core::{Aggregatable, EString, ParseFragment, ToEString}; use crate::core::{EString, ParseFragment, ToEString};
impl<T> ToEString for Option<T> impl<T> ToEString for Option<T>
where where
@ -26,9 +26,9 @@ where
} }
#[cfg(feature = "aggs")] #[cfg(feature = "aggs")]
impl<T> Aggregatable for Option<T> impl<T> crate::core::Aggregatable for Option<T>
where where
T: Aggregatable, T: crate::core::Aggregatable,
{ {
type Item = T::Item; type Item = T::Item;

View File

@ -118,7 +118,7 @@ hello=bar",
#[test] #[test]
fn should_format_pair() { fn should_format_pair() {
let pair = Pair::<_, '+', _>(1, 2); 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); let pair_in_pair = Pair::<_, '=', _>(3, pair);
assert_eq!(pair_in_pair.to_estring(), EString(String::from("3=1+2"))); assert_eq!(pair_in_pair.to_estring(), EString(String::from("3=1+2")));
} }

View File

@ -1,7 +1,7 @@
//! Contains the implementations to vec type //! Contains the implementations to vec type
//! //!
use crate::core::{Aggregatable, EString, ParseFragment, ToEString}; use crate::core::{EString, ParseFragment, ToEString};
use std::fmt::Write; use std::fmt::Write;
/// Wrapper for ``Vec`` to split string by a separator (`SEP`). /// Wrapper for ``Vec`` to split string by a separator (`SEP`).
@ -93,9 +93,9 @@ where
} }
#[cfg(feature = "aggs")] #[cfg(feature = "aggs")]
impl<T, const SEP: char> Aggregatable for SepVec<T, SEP> impl<T, const SEP: char> crate::core::Aggregatable for SepVec<T, SEP>
where where
T: Aggregatable, T: crate::core::Aggregatable,
{ {
type Item = T::Item; type Item = T::Item;
@ -107,6 +107,7 @@ where
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::Aggregatable;
use crate::Pair; use crate::Pair;
use crate::{Error, Reason}; use crate::{Error, Reason};