Skip to content

Commit

Permalink
🔥 zd,zm,zx: Remove redundant imports
Browse files Browse the repository at this point in the history
Otherwise clippy complains about it:

```rust
 error: the item `syn` is imported redundantly
  --> zvariant_derive/src/lib.rs:14:11
   |
14 | use syn::{self, DeriveInput};
   |           ^^^^ the item `syn` is already defined here
   |
   = note: `-D unused-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_imports)]`

error: the item `syn` is imported redundantly
 --> zvariant_derive/src/type.rs:4:5
  |
4 |     self, spanned::Spanned, Attribute, Data, DataEnum, DeriveInput, Error, Fields, Generics, Ident,
  |     ^^^^ the item `syn` is already defined here

error: the item `syn` is imported redundantly
 --> zvariant_derive/src/value.rs:4:5
  |
4 |     self, spanned::Spanned, Attribute, Data, DataEnum, DeriveInput, Error, Expr, Fields, Generics,
  |     ^^^^ the item `syn` is already defined here

   Compiling aho-corasick v1.1.2
   Compiling memoffset v0.9.0
    Checking utf8parse v0.2.1
error: could not compile `zvariant_derive` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.
```
  • Loading branch information
zeenix committed Feb 19, 2024
1 parent 2f1ac1b commit bd0738c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion zbus_macros/src/iface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use proc_macro2::TokenStream;
use quote::{format_ident, quote};
use std::collections::BTreeMap;
use syn::{
self, parse_quote, punctuated::Punctuated, spanned::Spanned, AngleBracketedGenericArguments,
parse_quote, punctuated::Punctuated, spanned::Spanned, AngleBracketedGenericArguments,
Attribute, AttributeArgs, Error, FnArg, GenericArgument, ImplItem, ImplItemMethod, ItemImpl,
Lit::Str, Meta, Meta::NameValue, MetaList, MetaNameValue, NestedMeta, PatType, PathArguments,
ReturnType, Signature, Token, Type, TypePath,
Expand Down
2 changes: 1 addition & 1 deletion zbus_macros/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use proc_macro2::{Literal, Span, TokenStream};
use quote::{format_ident, quote, quote_spanned, ToTokens};
use regex::Regex;
use syn::{
self, fold::Fold, parse_quote, parse_str, spanned::Spanned, AttributeArgs, Error, FnArg, Ident,
fold::Fold, parse_quote, parse_str, spanned::Spanned, AttributeArgs, Error, FnArg, Ident,
ItemTrait, Path, ReturnType, TraitItemMethod,
};
use zvariant_utils::{case, def_attrs, macros::AttrParse, old_new};
Expand Down
1 change: 0 additions & 1 deletion zbus_xmlgen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::{
error::Error,
fs::{File, OpenOptions},
io::Write,
result::Result,
};

use clap::Parser;
Expand Down
2 changes: 1 addition & 1 deletion zvariant_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)))]

use proc_macro::TokenStream;
use syn::{self, DeriveInput};
use syn::DeriveInput;

mod dict;
mod r#type;
Expand Down
2 changes: 1 addition & 1 deletion zvariant_derive/src/type.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use proc_macro2::TokenStream;
use quote::{quote, ToTokens};
use syn::{
self, spanned::Spanned, Attribute, Data, DataEnum, DeriveInput, Error, Fields, Generics, Ident,
spanned::Spanned, Attribute, Data, DataEnum, DeriveInput, Error, Fields, Generics, Ident,
};

use crate::utils::*;
Expand Down
4 changes: 2 additions & 2 deletions zvariant_derive/src/value.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use proc_macro2::{Span, TokenStream};
use quote::{quote, ToTokens};
use syn::{
self, spanned::Spanned, Attribute, Data, DataEnum, DeriveInput, Error, Expr, Fields, Generics,
Ident, Lifetime, LifetimeDef,
spanned::Spanned, Attribute, Data, DataEnum, DeriveInput, Error, Expr, Fields, Generics, Ident,
Lifetime, LifetimeDef,
};

use crate::utils::*;
Expand Down

0 comments on commit bd0738c

Please sign in to comment.