Skip to content

Commit e31d71a

Browse files
committed
fix clippy and typo
1 parent 0caa552 commit e31d71a

5 files changed

Lines changed: 4 additions & 14 deletions

File tree

typos.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ XF86_Calculater = "XF86_Calculater" # From xkbcommon_dl::keysyms::XF86_Calculate
66
ptd = "ptd" # From windows_sys::Win32::System::Com::FORMATETC { ptd, ..}
77
requestor = "requestor" # From x11_dl::xlib::XSelectionEvent { requestor ..}
88

9+
[default.extend-words]
10+
constrait = "constrait" # From winit-wayland/popup.rs constrait_adjustment.
11+
912
[files]
1013
extend-exclude = ["*.drawio"]

winit-wayland/src/popup.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ use std::sync::{Arc, Mutex, Weak};
55
use dpi::{LogicalPosition, PhysicalInsets, PhysicalPosition, PhysicalSize, Position, Size};
66
use rwh_06::RawWindowHandle;
77
use sctk::compositor::SurfaceData;
8-
use sctk::reexports::client::protocol::wl_surface::WlSurface;
98
use sctk::shell::WaylandSurface;
109
use sctk::shell::xdg::popup::Popup as SctkPopup;
1110
use sctk::shell::xdg::{XdgPositioner, XdgSurface};
1211
use wayland_client::Proxy;
1312
use wayland_client::protocol::wl_display::WlDisplay;
14-
use wayland_protocols::xdg::shell::client::xdg_positioner::{
15-
Anchor, ConstraintAdjustment, Gravity,
16-
};
1713
use winit_core::cursor::Cursor;
1814
use winit_core::error::{NotSupportedError, RequestError};
1915
use winit_core::event::{Ime, WindowEvent};
@@ -122,7 +118,6 @@ impl Popup {
122118
size.to_logical(scale_factor).width,
123119
size.to_logical(scale_factor).height,
124120
);
125-
positioner.set_constraint_adjustment(ConstraintAdjustment::all());
126121

127122
let parent_surface = parent_window_state.window.xdg_surface();
128123
let surface = state.compositor_state.create_surface(&queue_handle);

winit-wayland/src/seat/keyboard/mod.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! The keyboard input handling.
22
33
use std::sync::Mutex;
4-
use std::sync::atomic::Ordering;
54
use std::time::Duration;
65

76
use calloop::timer::{TimeoutAction, Timer};
@@ -232,12 +231,7 @@ impl Dispatch<WlKeyboard, KeyboardData, WinitState> for WinitState {
232231
}
233232
},
234233
WlKeyboardEvent::Modifiers {
235-
serial,
236-
mods_depressed,
237-
mods_latched,
238-
mods_locked,
239-
group,
240-
..
234+
mods_depressed, mods_latched, mods_locked, group, ..
241235
} => {
242236
let xkb_context = &mut keyboard_state.xkb_context;
243237
let xkb_state = match xkb_context.state_mut() {

winit-wayland/src/seat/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
use std::cell::Cell;
44
use std::sync::Arc;
5-
use std::sync::atomic::{AtomicU32, Ordering};
65

76
use foldhash::HashMap;
87
use sctk::reexports::client::backend::ObjectId;

winit-wayland/src/seat/pointer/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! The pointer events.
22
33
use std::ops::Deref;
4-
use std::sync::atomic::Ordering;
54
use std::sync::{Arc, Mutex};
65
use std::time::Duration;
76

0 commit comments

Comments
 (0)