Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DataTriny committed Sep 22, 2024
1 parent 82d8eee commit d49149c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions platforms/windows/examples/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use windows::{
},
};


static WINDOW_CLASS_ATOM: Lazy<u16> = Lazy::new(|| {
let class_name = w!("AccessKitTest");

Expand Down Expand Up @@ -255,7 +254,7 @@ extern "system" fn wndproc(window: HWND, message: u32, wparam: WPARAM, lparam: L
LRESULT(0)
}
WM_GETOBJECT => {
let state_ptr = unsafe { get_window_state(window.into()) };
let state_ptr = unsafe { get_window_state(window) };
if state_ptr.is_null() {
// We need to be prepared to gracefully handle WM_GETOBJECT
// while the window is being destroyed; this can happen if
Expand Down Expand Up @@ -344,7 +343,7 @@ fn create_window(title: &str, initial_focus: NodeId) -> Result<HWND> {
return Err(Error::from_win32());
}

Ok(window.into())
Ok(window)
}

fn main() -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/src/subclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl SubclassImpl {
activation_handler: impl 'static + ActivationHandler,
action_handler: impl 'static + ActionHandler + Send,
) -> Box<Self> {
let adapter = Adapter::new(hwnd.into(), false, action_handler);
let adapter = Adapter::new(hwnd, false, action_handler);
let state = RefCell::new(SubclassState {
adapter,
activation_handler: Box::new(activation_handler),
Expand Down

0 comments on commit d49149c

Please sign in to comment.