Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion derive_builder/tests/try_setter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions derive_builder_core/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -76,7 +76,6 @@ mod test {
use std::convert::TryInto;

use super::*;
use proc_macro2::Span;

fn parse(s: &str) -> Result<BlockContents, syn::Error> {
(&LitStr::new(s, Span::call_site())).try_into()
Expand Down
3 changes: 1 addition & 2 deletions derive_builder_core/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down
5 changes: 2 additions & 3 deletions derive_builder_core/src/macro_options/darling_opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down