Skip to content

Commit

Permalink
Update to windows-rs 0.27 (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwcampbell authored Nov 17, 2021
1 parent d7c85ff commit 0e933a7
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 28 deletions.
56 changes: 36 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions platforms/windows/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ accesskit_schema = { path = "../../schema" }
arrayvec = "0.7.1"

[dependencies.windows]
version = "0.24.0"
version = "0.27.0"
features = [
"alloc",
"build",
"std",
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_System_Com",
"Win32_System_LibraryLoader",
"Win32_System_Ole_Automation",
"Win32_System_Ole",
"Win32_System_Threading",
"Win32_UI_Accessibility",
"Win32_UI_Input_KeyboardAndMouse",
Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/examples/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::num::NonZeroU64;
use accesskit_schema::{Node, NodeId, Role, StringEncoding, Tree, TreeId, TreeUpdate};
use lazy_static::lazy_static;
use windows::{
runtime::*,
core::*,
Win32::{
Foundation::*,
Graphics::Gdi::ValidateRect,
Expand Down
4 changes: 2 additions & 2 deletions platforms/windows/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use accesskit_schema::{NodeIdContent, Role};
use arrayvec::ArrayVec;
use windows as Windows;
use windows::{
runtime::*,
core::*,
Win32::{Foundation::*, Graphics::Gdi::*, System::Com::*, UI::Accessibility::*},
};

Expand Down Expand Up @@ -414,7 +414,7 @@ impl PlatformNode {
{
self.node
.map(|node| f(ResolvedPlatformNode::new(node, self.hwnd)))
.unwrap_or_else(|| Err(Error::new(HRESULT(UIA_E_ELEMENTNOTAVAILABLE), "")))
.unwrap_or_else(|| Err(Error::new(HRESULT(UIA_E_ELEMENTNOTAVAILABLE), "".into())))
}

fn ProviderOptions(&self) -> Result<ProviderOptions> {
Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use parking_lot::{const_mutex, Condvar, Mutex};
use std::{sync::Arc, time::Duration};
use windows as Windows;
use windows::{
runtime::*,
core::*,
Win32::{
Foundation::*,
Graphics::Gdi::ValidateRect,
Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/src/tests/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use std::{convert::TryInto, num::NonZeroU64};

use accesskit_schema::{Node, NodeId, Role, StringEncoding, Tree, TreeId, TreeUpdate};
use windows::{runtime::*, Win32::UI::Accessibility::*};
use windows::{core::*, Win32::UI::Accessibility::*};

use super::*;

Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use std::{convert::TryInto, mem::ManuallyDrop};
use windows::Win32::{
Foundation::*,
System::{Com::*, Ole::Automation::*},
System::{Com::*, Ole::*},
};

pub(crate) struct VariantFactory(VARENUM, VARIANT_0_0_0);
Expand Down

0 comments on commit 0e933a7

Please sign in to comment.