diff --git a/derive_builder/tests/try_setter.rs b/derive_builder/tests/try_setter.rs index b502d20..e454fbe 100644 --- a/derive_builder/tests/try_setter.rs +++ b/derive_builder/tests/try_setter.rs @@ -4,7 +4,6 @@ extern crate derive_builder; use std::convert::TryFrom; use std::net::{AddrParseError, IpAddr}; use std::str::FromStr; -use std::string::ToString; #[derive(Debug, Clone, PartialEq)] pub struct MyAddr(IpAddr); diff --git a/derive_builder_core/src/block.rs b/derive_builder_core/src/block.rs index 0550288..0d53cba 100644 --- a/derive_builder_core/src/block.rs +++ b/derive_builder_core/src/block.rs @@ -2,7 +2,7 @@ use std::convert::TryFrom; use proc_macro2::{Span, TokenStream}; use quote::ToTokens; -use syn::{self, spanned::Spanned, Block, LitStr}; +use syn::{spanned::Spanned, Block, LitStr}; /// A wrapper for expressions/blocks which automatically adds the start and end /// braces. @@ -76,7 +76,6 @@ mod test { use std::convert::TryInto; use super::*; - use proc_macro2::Span; fn parse(s: &str) -> Result { (&LitStr::new(s, Span::call_site())).try_into() diff --git a/derive_builder_core/src/builder.rs b/derive_builder_core/src/builder.rs index 35512e1..780fdf2 100644 --- a/derive_builder_core/src/builder.rs +++ b/derive_builder_core/src/builder.rs @@ -3,7 +3,7 @@ use std::borrow::Cow; use proc_macro2::TokenStream; use quote::{format_ident, ToTokens, TokenStreamExt}; use syn::punctuated::Punctuated; -use syn::{self, Path, TraitBound, TraitBoundModifier, TypeParamBound}; +use syn::{Path, TraitBound, TraitBoundModifier, TypeParamBound}; use crate::{ doc_comment_from, BuildMethod, BuilderField, BuilderPattern, DeprecationNotes, Setter, @@ -405,7 +405,6 @@ macro_rules! default_builder { mod tests { #[allow(unused_imports)] use super::*; - use proc_macro2::TokenStream; use syn::Ident; fn add_simple_foo_builder(result: &mut TokenStream) { diff --git a/derive_builder_core/src/macro_options/darling_opts.rs b/derive_builder_core/src/macro_options/darling_opts.rs index bbcf4c7..062e8e5 100644 --- a/derive_builder_core/src/macro_options/darling_opts.rs +++ b/derive_builder_core/src/macro_options/darling_opts.rs @@ -3,10 +3,9 @@ use std::{borrow::Cow, vec::IntoIter}; use crate::BuildMethod; use darling::util::{Flag, PathList, SpannedValue}; -use darling::{self, Error, FromMeta}; +use darling::{Error, FromMeta}; use proc_macro2::Span; -use syn::Meta; -use syn::{self, spanned::Spanned, Attribute, Generics, Ident, Path}; +use syn::{spanned::Spanned, Attribute, Generics, Ident, Meta, Path}; use crate::{ BlockContents, Builder, BuilderField, BuilderFieldType, BuilderPattern, DefaultExpression,