From 285eb56cf5a02ee778880b8e1b7bb2e8118a5a88 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Sun, 18 Feb 2024 22:39:08 -0500 Subject: [PATCH] Fix 'unused_imports' warnings that started appearing in CI recently --- bindgen/codegen/helpers.rs | 2 +- bindgen/codegen/mod.rs | 2 +- bindgen/codegen/struct_layout.rs | 2 +- bindgen/ir/context.rs | 1 - bindgen/ir/function.rs | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bindgen/codegen/helpers.rs b/bindgen/codegen/helpers.rs index 48bfe56dde..fa1dde8786 100644 --- a/bindgen/codegen/helpers.rs +++ b/bindgen/codegen/helpers.rs @@ -126,7 +126,7 @@ pub(crate) mod ast_ty { use crate::ir::function::FunctionSig; use crate::ir::layout::Layout; use crate::ir::ty::{FloatKind, IntKind}; - use proc_macro2::{self, TokenStream}; + use proc_macro2::TokenStream; use std::str::FromStr; pub(crate) fn c_void(ctx: &BindgenContext) -> syn::Type { diff --git a/bindgen/codegen/mod.rs b/bindgen/codegen/mod.rs index dd1486df74..339c2fe59b 100644 --- a/bindgen/codegen/mod.rs +++ b/bindgen/codegen/mod.rs @@ -52,7 +52,7 @@ use crate::ir::template::{ use crate::ir::ty::{Type, TypeKind}; use crate::ir::var::Var; -use proc_macro2::{self, Ident, Span}; +use proc_macro2::{Ident, Span}; use quote::TokenStreamExt; use crate::{Entry, HashMap, HashSet}; diff --git a/bindgen/codegen/struct_layout.rs b/bindgen/codegen/struct_layout.rs index f4596a1992..7349669871 100644 --- a/bindgen/codegen/struct_layout.rs +++ b/bindgen/codegen/struct_layout.rs @@ -7,7 +7,7 @@ use crate::ir::context::BindgenContext; use crate::ir::layout::Layout; use crate::ir::ty::{Type, TypeKind}; use crate::FieldVisibilityKind; -use proc_macro2::{self, Ident, Span}; +use proc_macro2::{Ident, Span}; use std::cmp; const MAX_GUARANTEED_ALIGN: usize = 8; diff --git a/bindgen/ir/context.rs b/bindgen/ir/context.rs index f13f34abcd..26247cdcc5 100644 --- a/bindgen/ir/context.rs +++ b/bindgen/ir/context.rs @@ -29,7 +29,6 @@ use quote::ToTokens; use std::borrow::Cow; use std::cell::{Cell, RefCell}; use std::collections::{BTreeSet, HashMap as StdHashMap}; -use std::iter::IntoIterator; use std::mem; /// An identifier for some kind of IR item. diff --git a/bindgen/ir/function.rs b/bindgen/ir/function.rs index 448bcd22ea..1557843d03 100644 --- a/bindgen/ir/function.rs +++ b/bindgen/ir/function.rs @@ -9,7 +9,7 @@ use super::ty::TypeKind; use crate::callbacks::{ItemInfo, ItemKind}; use crate::clang::{self, ABIKind, Attribute}; use crate::parse::{ClangSubItemParser, ParseError, ParseResult}; -use clang_sys::{self, CXCallingConv}; +use clang_sys::CXCallingConv; use quote::TokenStreamExt; use std::io;