Bump MSRV to 1.64
This commit is contained in:
parent
fb9695d56d
commit
b18295a1ce
9 changed files with 21 additions and 18 deletions
|
|
@ -171,7 +171,7 @@ impl MonitorHandle {
|
|||
sctk::output::with_output_info(&self.proxy, |info| {
|
||||
info.modes
|
||||
.iter()
|
||||
.find_map(|mode| mode.is_current.then(|| mode.refresh_rate as u32))
|
||||
.find_map(|mode| mode.is_current.then_some(mode.refresh_rate as u32))
|
||||
})
|
||||
.flatten()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ pub(super) fn handle_text_input(
|
|||
let text = text.unwrap_or_default();
|
||||
let cursor_begin = usize::try_from(cursor_begin)
|
||||
.ok()
|
||||
.and_then(|idx| text.is_char_boundary(idx).then(|| idx));
|
||||
.and_then(|idx| text.is_char_boundary(idx).then_some(idx));
|
||||
let cursor_end = usize::try_from(cursor_end)
|
||||
.ok()
|
||||
.and_then(|idx| text.is_char_boundary(idx).then(|| idx));
|
||||
.and_then(|idx| text.is_char_boundary(idx).then_some(idx));
|
||||
|
||||
inner.pending_preedit = Some(Preedit {
|
||||
text,
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ impl ImeContext {
|
|||
ptr::null_mut::<()>(),
|
||||
);
|
||||
|
||||
(!ic.is_null()).then(|| ic)
|
||||
(!ic.is_null()).then_some(ic)
|
||||
}
|
||||
|
||||
unsafe fn create_preedit_ic(
|
||||
|
|
@ -302,7 +302,7 @@ impl ImeContext {
|
|||
ptr::null_mut::<()>(),
|
||||
);
|
||||
|
||||
(!ic.is_null()).then(|| ic)
|
||||
(!ic.is_null()).then_some(ic)
|
||||
}
|
||||
|
||||
unsafe fn create_nothing_ic(
|
||||
|
|
@ -320,7 +320,7 @@ impl ImeContext {
|
|||
ptr::null_mut::<()>(),
|
||||
);
|
||||
|
||||
(!ic.is_null()).then(|| ic)
|
||||
(!ic.is_null()).then_some(ic)
|
||||
}
|
||||
|
||||
pub(crate) fn focus(&self, xconn: &Arc<XConnection>) -> Result<(), XError> {
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ impl<'a> NormalHints<'a> {
|
|||
}
|
||||
|
||||
pub fn get_resize_increments(&self) -> Option<(u32, u32)> {
|
||||
has_flag(self.size_hints.flags, ffi::PResizeInc).then(|| {
|
||||
has_flag(self.size_hints.flags, ffi::PResizeInc).then_some({
|
||||
(
|
||||
self.size_hints.width_inc as u32,
|
||||
self.size_hints.height_inc as u32,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue