Skip to content

Commit 6bde69c

Browse files
authored
Merge branch 'master' into keyboard-hook
2 parents f58f79f + d39a848 commit 6bde69c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/win/drop_target.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,22 @@ use super::WindowState;
2727
// These function pointers have to be stored in a (const) variable before they can be transmuted
2828
// Transmuting is needed because winapi has a bug where the pt parameter has an incorrect
2929
// type `*const POINTL`
30+
#[allow(non_snake_case)]
3031
const DRAG_ENTER_PTR: unsafe extern "system" fn(
3132
this: *mut IDropTarget,
3233
pDataObj: *const IDataObject,
3334
grfKeyState: DWORD,
3435
pt: POINTL,
3536
pdwEffect: *mut DWORD,
3637
) -> HRESULT = DropTarget::drag_enter;
38+
#[allow(non_snake_case)]
3739
const DRAG_OVER_PTR: unsafe extern "system" fn(
3840
this: *mut IDropTarget,
3941
grfKeyState: DWORD,
4042
pt: POINTL,
4143
pdwEffect: *mut DWORD,
4244
) -> HRESULT = DropTarget::drag_over;
45+
#[allow(non_snake_case)]
4346
const DROP_PTR: unsafe extern "system" fn(
4447
this: *mut IDropTarget,
4548
pDataObj: *const IDataObject,

src/win/window.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,19 +525,19 @@ pub(super) struct WindowState {
525525
}
526526

527527
impl WindowState {
528-
pub(super) fn create_window(&self) -> Window {
528+
pub(super) fn create_window(&self) -> Window<'_> {
529529
Window { state: self }
530530
}
531531

532-
pub(super) fn window_info(&self) -> Ref<WindowInfo> {
532+
pub(super) fn window_info(&self) -> Ref<'_, WindowInfo> {
533533
self.window_info.borrow()
534534
}
535535

536-
pub(super) fn keyboard_state(&self) -> Ref<KeyboardState> {
536+
pub(super) fn keyboard_state(&self) -> Ref<'_, KeyboardState> {
537537
self.keyboard_state.borrow()
538538
}
539539

540-
pub(super) fn handler_mut(&self) -> RefMut<Option<Box<dyn WindowHandler>>> {
540+
pub(super) fn handler_mut(&self) -> RefMut<'_, Option<Box<dyn WindowHandler>>> {
541541
self.handler.borrow_mut()
542542
}
543543

0 commit comments

Comments
 (0)