Skip to content

Commit

Permalink
Fix for new redundant import warnings in nightly Rust (#2858)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Feb 19, 2024
1 parent a9b594b commit 057d293
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 19 deletions.
1 change: 0 additions & 1 deletion crates/libs/bindgen/src/rdl/from_reader.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use super::*;
use crate::Result;
use tokens::{quote, to_ident, TokenStream};

pub fn from_reader(reader: &'static metadata::Reader, mut config: std::collections::BTreeMap<&str, &str>, output: &str) -> Result<()> {
Expand Down
3 changes: 1 addition & 2 deletions crates/libs/bindgen/src/rdl/to_winmd.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::*;
use crate::winmd::{self, writer};
use crate::Result;
use crate::winmd::writer;

// TODO: store span in winmd so that errors resolving type references can be traced back to file/line/column
use std::collections::HashMap;
Expand Down
1 change: 0 additions & 1 deletion crates/libs/bindgen/src/rust/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ mod try_format;
mod winrt_methods;
mod writer;
use super::*;
use crate::Result;
use rayon::prelude::*;

pub fn from_reader(reader: &'static metadata::Reader, mut config: std::collections::BTreeMap<&str, &str>, output: &str) -> Result<()> {
Expand Down
1 change: 0 additions & 1 deletion crates/libs/bindgen/src/winmd/writer/tables.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![allow(non_snake_case)]

use super::Write;
use super::*;

#[derive(Default)]
Expand Down
2 changes: 0 additions & 2 deletions crates/libs/result/src/com.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ macro_rules! com_call {
}
}

pub use com_call;

#[repr(transparent)]
pub struct ComPtr(std::ptr::NonNull<std::ffi::c_void>);

Expand Down
1 change: 0 additions & 1 deletion crates/tests/collections/tests/stock_iterable.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![allow(non_snake_case)]

use std::convert::TryFrom;
use windows::{core::*, Foundation::Collections::*, Foundation::*, Win32::Foundation::E_BOUNDS};

#[test]
Expand Down
1 change: 0 additions & 1 deletion crates/tests/collections/tests/stock_map_view.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![allow(non_snake_case)]

use std::collections::BTreeMap;
use std::convert::{TryFrom, TryInto};
use windows::{core::*, Foundation::Collections::*, Win32::Foundation::E_BOUNDS};

#[test]
Expand Down
1 change: 0 additions & 1 deletion crates/tests/collections/tests/stock_vector_view.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![allow(non_snake_case)]

use std::convert::TryFrom;
use windows::{core::*, Foundation::Collections::*, Win32::Foundation::E_BOUNDS};

#[test]
Expand Down
1 change: 0 additions & 1 deletion crates/tests/core/tests/hstring.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::convert::TryFrom;
use windows::core::*;

#[test]
Expand Down
1 change: 0 additions & 1 deletion crates/tests/win32/tests/hresult.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::convert::TryInto;
use windows::core::HRESULT;
use windows::Win32::Foundation::*;

Expand Down
5 changes: 1 addition & 4 deletions crates/tests/win32/tests/win32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use windows::{
Win32::Security::Authorization::*,
Win32::System::Com::StructuredStorage::*,
Win32::System::Com::*,
Win32::System::{Com::CreateUri, Diagnostics::Debug::*, Threading::*},
Win32::System::{Diagnostics::Debug::*, Threading::*},
Win32::UI::{
Accessibility::UIA_ScrollPatternNoScroll,
Animation::UIAnimationManager,
Expand All @@ -20,9 +20,6 @@ use windows::{
},
};

use std::convert::TryInto;
use windows::core::GUID;

#[test]
fn signed_enum32() {
assert!(ACCESS_MODE::default().0 == 0);
Expand Down
1 change: 0 additions & 1 deletion crates/tests/winrt/tests/boxing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use core::convert::{TryFrom, TryInto};
use windows::core::*;
use windows::Foundation::*;

Expand Down
1 change: 0 additions & 1 deletion crates/tests/winrt/tests/collections.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use core::convert::*;
use core::iter::FromIterator;

use windows::{
core::Interface,
Expand Down
1 change: 0 additions & 1 deletion crates/tests/winrt/tests/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::convert::TryInto;
use windows::{Foundation::Uri, Win32::Foundation::E_NOINTERFACE};

#[test]
Expand Down

0 comments on commit 057d293

Please sign in to comment.