diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dc6221..f845873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - `U16String::pop_char` panics with surrogate string. Fixes [#38]. +- Various import and new clippy warnings. ## [1.0.2] - 2022-07-15 ### Fixed diff --git a/src/error.rs b/src/error.rs index 59f07ab..568031e 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,6 +1,7 @@ //! Errors returned by functions in this crate. #[cfg(feature = "alloc")] +#[allow(unused_imports)] use alloc::vec::Vec; /// An error returned to indicate a problem with nul values occurred. diff --git a/src/iter.rs b/src/iter.rs index 3302060..b7f9e4c 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -5,6 +5,7 @@ use crate::{ error::{DecodeUtf16Error, DecodeUtf32Error}, is_utf16_high_surrogate, is_utf16_low_surrogate, is_utf16_surrogate, }; +#[allow(unused_imports)] use core::{ char, iter::{DoubleEndedIterator, ExactSizeIterator, FusedIterator}, diff --git a/src/lib.rs b/src/lib.rs index 8aec808..42eb5ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -236,6 +236,7 @@ extern crate alloc; use crate::error::{DecodeUtf16Error, DecodeUtf32Error}; #[cfg(feature = "alloc")] +#[allow(unused_imports)] use alloc::vec::Vec; use core::fmt::Write; diff --git a/src/ucstr.rs b/src/ucstr.rs index 60907ae..5060f0c 100644 --- a/src/ucstr.rs +++ b/src/ucstr.rs @@ -7,6 +7,7 @@ use crate::{ U16Str, U32Str, }; #[cfg(feature = "alloc")] +#[allow(unused_imports)] use alloc::{borrow::ToOwned, boxed::Box, string::String}; use core::{ fmt::Write, diff --git a/src/ucstring.rs b/src/ucstring.rs index 173c4a9..b57edcf 100644 --- a/src/ucstring.rs +++ b/src/ucstring.rs @@ -3,6 +3,7 @@ //! This module contains wide C strings and related types. use crate::{error::ContainsNul, U16CStr, U16Str, U16String, U32CStr, U32Str, U32String}; +#[allow(unused_imports)] use alloc::{ borrow::{Cow, ToOwned}, boxed::Box, diff --git a/src/ustr.rs b/src/ustr.rs index a967aa5..eca3e13 100644 --- a/src/ustr.rs +++ b/src/ustr.rs @@ -8,6 +8,7 @@ use crate::{ U16String, U32String, }; #[cfg(feature = "alloc")] +#[allow(unused_imports)] use alloc::{boxed::Box, string::String, vec::Vec}; use core::{ char, diff --git a/src/ustring.rs b/src/ustring.rs index 4735de2..c06d646 100644 --- a/src/ustring.rs +++ b/src/ustring.rs @@ -3,6 +3,7 @@ //! This module contains wide strings and related types. use crate::{U16CStr, U16CString, U16Str, U32CStr, U32CString, U32Str}; +#[allow(unused_imports)] use alloc::{ borrow::{Cow, ToOwned}, boxed::Box, diff --git a/src/utfstr.rs b/src/utfstr.rs index 52e64de..d30c3f7 100644 --- a/src/utfstr.rs +++ b/src/utfstr.rs @@ -11,6 +11,7 @@ use crate::{ #[cfg(feature = "alloc")] use crate::{Utf16String, Utf32String}; #[cfg(feature = "alloc")] +#[allow(unused_imports)] use alloc::{borrow::Cow, boxed::Box, string::String}; use core::{ convert::{AsMut, AsRef, TryFrom}, diff --git a/src/utfstring.rs b/src/utfstring.rs index 676a7c6..f07eb88 100644 --- a/src/utfstring.rs +++ b/src/utfstring.rs @@ -8,6 +8,7 @@ use crate::{ is_utf16_low_surrogate, is_utf16_surrogate, validate_utf16, validate_utf16_vec, validate_utf32, validate_utf32_vec, Utf16Str, Utf32Str, }; +#[allow(unused_imports)] use alloc::{ borrow::{Cow, ToOwned}, boxed::Box,