Skip to content

Commit d39a848

Browse files
authored
Address warnings from latest version of rustc (#213)
1 parent 3724a00 commit d39a848

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
@@ -519,19 +519,19 @@ pub(super) struct WindowState {
519519
}
520520

521521
impl WindowState {
522-
pub(super) fn create_window(&self) -> Window {
522+
pub(super) fn create_window(&self) -> Window<'_> {
523523
Window { state: self }
524524
}
525525

526-
pub(super) fn window_info(&self) -> Ref<WindowInfo> {
526+
pub(super) fn window_info(&self) -> Ref<'_, WindowInfo> {
527527
self.window_info.borrow()
528528
}
529529

530-
pub(super) fn keyboard_state(&self) -> Ref<KeyboardState> {
530+
pub(super) fn keyboard_state(&self) -> Ref<'_, KeyboardState> {
531531
self.keyboard_state.borrow()
532532
}
533533

534-
pub(super) fn handler_mut(&self) -> RefMut<Option<Box<dyn WindowHandler>>> {
534+
pub(super) fn handler_mut(&self) -> RefMut<'_, Option<Box<dyn WindowHandler>>> {
535535
self.handler.borrow_mut()
536536
}
537537

0 commit comments

Comments
 (0)