diff --git a/Cargo.lock b/Cargo.lock index d64377809c..33a2e1b7d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,10 +29,10 @@ dependencies = [ "bitflags 2.2.1", "cexpr", "clang-sys", + "itertools", "lazy_static", "lazycell", "log", - "peeking_take_while", "prettyplease", "proc-macro2", "quote", @@ -299,6 +299,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "itertools" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -406,12 +415,6 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "prettyplease" version = "0.2.7" diff --git a/bindgen/Cargo.toml b/bindgen/Cargo.toml index 733679a603..eafa2ce35d 100644 --- a/bindgen/Cargo.toml +++ b/bindgen/Cargo.toml @@ -29,10 +29,10 @@ annotate-snippets = { version = "0.9.1", features = ["color"], optional = true } bitflags = "2.2.1" cexpr = "0.6" clang-sys = { version = "1", features = ["clang_6_0"] } +itertools = { version = "0.12.0", default-features = false } lazy_static = "1" lazycell = "1" log = { version = "0.4", optional = true } -peeking_take_while = "0.1.2" prettyplease = { version = "0.2.7", optional = true, features = ["verbatim"] } proc-macro2 = { version = "1", default-features = false } quote = { version = "1", default-features = false } diff --git a/bindgen/ir/comp.rs b/bindgen/ir/comp.rs index 89e77e160f..a5d06fa556 100644 --- a/bindgen/ir/comp.rs +++ b/bindgen/ir/comp.rs @@ -1,5 +1,7 @@ //! Compound types (unions and structs) in our intermediate representation. +use itertools::Itertools; + use super::analysis::Sizedness; use super::annotations::Annotations; use super::context::{BindgenContext, FunctionId, ItemId, TypeId, VarId}; @@ -15,7 +17,6 @@ use crate::ir::derive::CanDeriveCopy; use crate::parse::ParseError; use crate::HashMap; use crate::NonCopyUnionStyle; -use peeking_take_while::PeekableExt; use std::cmp; use std::io; use std::mem;