From 4668857a14044134191b33cdd3f28566e8cc2099 Mon Sep 17 00:00:00 2001 From: iamawacko Date: Sat, 24 Feb 2024 22:58:10 -0800 Subject: [PATCH] chore: remove redundant imports --- core/src/compile/link.rs | 1 - core/src/compile/mod.rs | 1 - core/src/graph/mod.rs | 2 -- core/src/graph/series.rs | 1 - core/src/graph/string/format.rs | 2 +- core/src/schema/content/bool.rs | 2 +- core/src/schema/content/mod.rs | 1 - core/src/schema/content/number.rs | 1 - core/src/schema/content/object.rs | 5 +---- core/src/schema/content/one_of.rs | 2 +- core/src/schema/content/prelude.rs | 1 - core/src/schema/content/series.rs | 3 --- core/src/schema/mod.rs | 2 +- core/src/schema/namespace.rs | 2 +- gen/src/generator/mod.rs | 5 +---- gen/src/value.rs | 1 - 16 files changed, 7 insertions(+), 25 deletions(-) diff --git a/core/src/compile/link.rs b/core/src/compile/link.rs index ca387529..5cf3940f 100644 --- a/core/src/compile/link.rs +++ b/core/src/compile/link.rs @@ -1,7 +1,6 @@ use synth_gen::prelude::{Generator, GeneratorState}; use std::cell::RefCell; -use std::iter::IntoIterator; use std::ops::Range; use std::rc::Rc; diff --git a/core/src/compile/mod.rs b/core/src/compile/mod.rs index cd6a8643..d329a1e8 100644 --- a/core/src/compile/mod.rs +++ b/core/src/compile/mod.rs @@ -21,7 +21,6 @@ //! into [`Graph`](crate::graph::Graph). use std::collections::{BTreeMap, BTreeSet}; -use std::iter::IntoIterator; use anyhow::{Context, Result}; diff --git a/core/src/graph/mod.rs b/core/src/graph/mod.rs index f7626312..b4169472 100644 --- a/core/src/graph/mod.rs +++ b/core/src/graph/mod.rs @@ -10,11 +10,9 @@ use sqlx::{encode::IsNull, Encode, Type}; use sqlx::{MySql, Postgres}; use synth_gen::prelude::*; -use synth_gen::value::{Token, Tokenizer}; use crate::compile::{Link, NamespaceCompiler}; -use crate::schema::{ChronoValueAndFormat, Namespace}; pub mod prelude; use prelude::*; diff --git a/core/src/graph/series.rs b/core/src/graph/series.rs index d455d27a..81f87361 100644 --- a/core/src/graph/series.rs +++ b/core/src/graph/series.rs @@ -1,6 +1,5 @@ use crate::graph::prelude::content::series::SeriesVariant; use crate::graph::prelude::*; -use crate::schema::content::series::SeriesContent; use anyhow::Result; use chrono::{Duration, NaiveDateTime}; use std::f64::consts::PI; diff --git a/core/src/graph/string/format.rs b/core/src/graph/string/format.rs index 83d12930..b6346eb6 100644 --- a/core/src/graph/string/format.rs +++ b/core/src/graph/string/format.rs @@ -1,7 +1,7 @@ use crate::graph::prelude::*; use anyhow::Result; -use dynfmt::{self, Format as DynFormat}; +use dynfmt::Format as DynFormat; type Formatted = TryOnce>>>; diff --git a/core/src/schema/content/bool.rs b/core/src/schema/content/bool.rs index 2bfc895e..67384298 100644 --- a/core/src/schema/content/bool.rs +++ b/core/src/schema/content/bool.rs @@ -1,5 +1,5 @@ use super::prelude::*; -use std::hash::{Hash, Hasher}; +use std::hash::Hasher; use super::Categorical; diff --git a/core/src/schema/content/mod.rs b/core/src/schema/content/mod.rs index 5f0ee07e..8d1dd62b 100644 --- a/core/src/schema/content/mod.rs +++ b/core/src/schema/content/mod.rs @@ -19,7 +19,6 @@ use std::hash::{Hash, Hasher}; use paste::paste; use serde::{de::IntoDeserializer, Deserialize, Serialize}; -use serde_json::Value; mod r#bool; pub use self::r#bool::BoolContent; diff --git a/core/src/schema/content/number.rs b/core/src/schema/content/number.rs index 10a9e2d1..6db027e9 100644 --- a/core/src/schema/content/number.rs +++ b/core/src/schema/content/number.rs @@ -6,7 +6,6 @@ use super::Categorical; use crate::graph::number::{RandomF32, RandomI16, RandomI32, RandomU32}; use serde::{ - de::{Deserialize, Deserializer}, ser::Serializer, Serialize, }; diff --git a/core/src/schema/content/object.rs b/core/src/schema/content/object.rs index 6c051106..119d8f0c 100644 --- a/core/src/schema/content/object.rs +++ b/core/src/schema/content/object.rs @@ -1,8 +1,5 @@ use super::prelude::*; -use serde::{ - de::{Deserialize, Deserializer}, - ser::Serializer, -}; +use serde::ser::Serializer; use std::borrow::Cow; use std::collections::BTreeMap; diff --git a/core/src/schema/content/one_of.rs b/core/src/schema/content/one_of.rs index 4722fa40..8c650bcf 100644 --- a/core/src/schema/content/one_of.rs +++ b/core/src/schema/content/one_of.rs @@ -1,6 +1,6 @@ #![allow(clippy::unconditional_recursion)] -use std::hash::{Hash, Hasher}; +use std::hash::Hasher; use super::prelude::*; diff --git a/core/src/schema/content/prelude.rs b/core/src/schema/content/prelude.rs index 481813b8..500afa2b 100644 --- a/core/src/schema/content/prelude.rs +++ b/core/src/schema/content/prelude.rs @@ -10,7 +10,6 @@ pub(super) type JsonObject = Map; // std pub(super) use std::collections::HashMap; -pub(super) use std::convert::TryFrom; pub(super) use std::fmt::{Display, Formatter}; pub(super) use std::hash::Hash; pub(super) use std::iter::{FromIterator, Peekable}; diff --git a/core/src/schema/content/series.rs b/core/src/schema/content/series.rs index 14311d69..ab3c7179 100644 --- a/core/src/schema/content/series.rs +++ b/core/src/schema/content/series.rs @@ -2,9 +2,6 @@ use super::prelude::*; use crate::graph::series::{ CyclicalSeries, IncrementingSeries, PoissonSeries, TimeSeries, ZipSeries, }; -use crate::{Compile, Compiler, Graph}; -use anyhow::Result; -use std::convert::TryInto; #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Hash)] #[serde(deny_unknown_fields)] diff --git a/core/src/schema/mod.rs b/core/src/schema/mod.rs index 1c65bf6a..905c0b21 100644 --- a/core/src/schema/mod.rs +++ b/core/src/schema/mod.rs @@ -1,6 +1,6 @@ #![allow(clippy::assertions_on_result_states)] use std::collections::VecDeque; -use std::iter::{Chain, IntoIterator, Once}; +use std::iter::{Chain, Once}; use std::str::FromStr; use anyhow::Result; diff --git a/core/src/schema/namespace.rs b/core/src/schema/namespace.rs index 0161c394..e2abbbbd 100644 --- a/core/src/schema/namespace.rs +++ b/core/src/schema/namespace.rs @@ -6,7 +6,7 @@ use crate::graph::prelude::OptionalMergeStrategy; use crate::graph::{Graph, KeyValueOrNothing}; use std::collections::BTreeMap; -use std::{default::Default, iter::FromIterator}; +use std::default::Default; use anyhow::{Context, Result}; use serde::{Deserialize, Serialize}; diff --git a/gen/src/generator/mod.rs b/gen/src/generator/mod.rs index 2731d5cc..16d3686b 100644 --- a/gen/src/generator/mod.rs +++ b/gen/src/generator/mod.rs @@ -1,7 +1,4 @@ -use std::{ - iter::{Extend, FromIterator}, - marker::PhantomData, -}; +use std::marker::PhantomData; use crate::{GeneratorState, Never}; diff --git a/gen/src/value.rs b/gen/src/value.rs index 8ee52f1b..a60c9f9b 100644 --- a/gen/src/value.rs +++ b/gen/src/value.rs @@ -1,6 +1,5 @@ //! Custom tokenization for the serde data model. //! -use std::convert::{TryFrom, TryInto}; use std::marker::PhantomData; use rand::Rng;