Skip to content

Commit cf98dc7

Browse files
committed
chore: fix ci
1 parent 3a8411a commit cf98dc7

File tree

10 files changed

+16
-20
lines changed

10 files changed

+16
-20
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ jobs:
111111
cargo generate-lockfile
112112
cargo update -p ahash --precise 0.8.7
113113
cargo update -p bumpalo --precise 3.14.0
114+
cargo update -p softbuffer --precise 0.4.0
114115
cargo update -p objc2-encode --precise 4.0.3
115116
cargo update -p orbclient --precise 0.3.47
117+
cargo update -p image --precise 0.25.0
116118
117119
- name: Install GCC Multilib
118120
if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')

deny.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ allow = [
5656
crate = "android-activity"
5757

5858
[[bans.build.bypass]]
59-
allow-globs = ["ci/*", "githooks/*"]
59+
allow-globs = ["ci/*", "githooks/*", "cargo.sh"]
6060
crate = "zerocopy"
6161

6262
[[bans.build.bypass]]

src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ pub struct KeyEvent {
621621
///
622622
/// # Example
623623
///
624-
/// In games, you often want to ignore repated key events - this can be
624+
/// In games, you often want to ignore repeated key events - this can be
625625
/// done by ignoring events where this property is set.
626626
///
627627
/// ```

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
#![cfg_attr(clippy, deny(warnings))]
183183
// Doc feature labels can be tested locally by running RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly
184184
// doc
185-
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide), doc(cfg_hide(doc, docsrs)))]
185+
#![cfg_attr(docsrs, feature(doc_cfg), doc(auto_cfg(hide(doc, docsrs))))]
186186
#![allow(clippy::missing_safety_doc)]
187187
#![warn(clippy::uninlined_format_args)]
188188
// TODO: wasm-binding needs to be updated for that to be resolved, for now just silence it.

src/platform_impl/linux/wayland/window/state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ impl WindowState {
369369
new_size.height.saturating_sub(self.min_inner_size.height),
370370
);
371371

372-
let width = self.min_inner_size.width
373-
+ (delta_width / increments.width) * increments.width;
372+
let width =
373+
self.min_inner_size.width + (delta_width / increments.width) * increments.width;
374374
let height = self.min_inner_size.height
375375
+ (delta_height / increments.height) * increments.height;
376376

src/platform_impl/linux/x11/ime/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extern "C" fn preedit_draw_callback(
8181
call_data.chg_first as usize..(call_data.chg_first + call_data.chg_length) as usize;
8282
if chg_range.start > client_data.text.len() || chg_range.end > client_data.text.len() {
8383
tracing::warn!(
84-
"invalid chg range: buffer length={}, but chg_first={} chg_lengthg={}",
84+
"invalid chg range: buffer length={}, but chg_first={} chg_length={}",
8585
client_data.text.len(),
8686
call_data.chg_first,
8787
call_data.chg_length
@@ -158,7 +158,7 @@ impl PreeditCallbacks {
158158
pub fn new(client_data: ffi::XPointer) -> PreeditCallbacks {
159159
let start_callback = create_xim_callback(client_data, unsafe {
160160
mem::transmute::<usize, unsafe extern "C" fn(ffi::XIM, ffi::XPointer, ffi::XPointer)>(
161-
preedit_start_callback as usize,
161+
preedit_start_callback as *const () as usize,
162162
)
163163
});
164164
let done_callback = create_xim_callback(client_data, preedit_done_callback);

src/platform_impl/linux/x11/ime/inner.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ impl ImeInner {
5151
}
5252

5353
pub unsafe fn close_im_if_necessary(&self) -> Result<bool, XError> {
54-
if !self.is_destroyed && self.im.is_some() {
55-
unsafe { close_im(&self.xconn, self.im.as_ref().unwrap().im) }.map(|_| true)
56-
} else {
57-
Ok(false)
54+
match self.im.as_ref() {
55+
Some(im) if !self.is_destroyed => unsafe { close_im(&self.xconn, im.im).map(|_| true) },
56+
_ => Ok(false),
5857
}
5958
}
6059

src/platform_impl/macos/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub(crate) fn create_key_event(ns_event: &NSEvent, is_press: bool, is_repeat: bo
128128

129129
let logical_key = match text_with_all_modifiers.as_ref() {
130130
// Only checking for ctrl and cmd here, not checking for alt because we DO want to
131-
// include its effect in the key. For example if -on the Germay layout- one
131+
// include its effect in the key. For example if -on the German layout- one
132132
// presses alt+8, the logical key should be "{"
133133
// Also not checking if this is a release event because then this issue would
134134
// still affect the key release.

src/platform_impl/windows/event_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2641,7 +2641,7 @@ unsafe fn handle_raw_input(userdata: &ThreadMsgTargetData, data: RAWINPUT) {
26412641
}
26422642

26432643
enum PointerMoveKind {
2644-
/// Pointer enterd to the window.
2644+
/// Pointer entered to the window.
26452645
Enter,
26462646
/// Pointer leaved the window client area.
26472647
Leave,

src/window.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,10 +1824,11 @@ pub enum WindowLevel {
18241824
/// ## Platform-specific
18251825
///
18261826
/// - **iOS / Android / Web / Windows / X11 / macOS / Orbital:** Unsupported.
1827-
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
1827+
#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
18281828
#[non_exhaustive]
18291829
pub enum ImePurpose {
18301830
/// No special hints for the IME (default).
1831+
#[default]
18311832
Normal,
18321833
/// The IME is used for password input.
18331834
Password,
@@ -1837,12 +1838,6 @@ pub enum ImePurpose {
18371838
Terminal,
18381839
}
18391840

1840-
impl Default for ImePurpose {
1841-
fn default() -> Self {
1842-
Self::Normal
1843-
}
1844-
}
1845-
18461841
/// An opaque token used to activate the [`Window`].
18471842
///
18481843
/// [`Window`]: crate::window::Window

0 commit comments

Comments
 (0)