mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 13:51:30 +11:00
Bump MSRV to 1.64
This commit is contained in:
parent
fb9695d56d
commit
b18295a1ce
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
rust_version: ['1.60.0', stable, nightly]
|
||||
rust_version: ['1.64.0', stable, nightly]
|
||||
platform:
|
||||
# Note: Make sure that we test all the `docs.rs` targets defined in Cargo.toml!
|
||||
- { target: x86_64-pc-windows-msvc, os: windows-latest, }
|
||||
|
@ -86,7 +86,7 @@ jobs:
|
|||
shell: bash
|
||||
if: >
|
||||
!contains(matrix.platform.target, 'redox') &&
|
||||
matrix.rust_version != '1.60.0'
|
||||
matrix.rust_version != '1.64.0'
|
||||
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
|
||||
|
||||
- name: Run tests
|
||||
|
@ -96,7 +96,7 @@ jobs:
|
|||
!contains(matrix.platform.target, 'ios') &&
|
||||
!contains(matrix.platform.target, 'wasm32') &&
|
||||
!contains(matrix.platform.target, 'redox') &&
|
||||
matrix.rust_version != '1.60.0'
|
||||
matrix.rust_version != '1.64.0'
|
||||
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
|
||||
|
||||
- name: Lint with clippy
|
||||
|
@ -108,7 +108,7 @@ jobs:
|
|||
shell: bash
|
||||
if: >
|
||||
!contains(matrix.platform.target, 'redox') &&
|
||||
matrix.rust_version != '1.60.0'
|
||||
matrix.rust_version != '1.64.0'
|
||||
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
|
||||
- name: Run tests with serde enabled
|
||||
shell: bash
|
||||
|
@ -117,5 +117,5 @@ jobs:
|
|||
!contains(matrix.platform.target, 'ios') &&
|
||||
!contains(matrix.platform.target, 'wasm32') &&
|
||||
!contains(matrix.platform.target, 'redox') &&
|
||||
matrix.rust_version != '1.60.0'
|
||||
matrix.rust_version != '1.64.0'
|
||||
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
|
||||
|
|
|
@ -8,6 +8,8 @@ And please only add new entries to the top of this list, right below the `# Unre
|
|||
|
||||
# Unreleased
|
||||
|
||||
- Bump MSRV from `1.60` to `1.64`.
|
||||
|
||||
# 0.28.2
|
||||
|
||||
- Implement `HasRawDisplayHandle` for `EventLoop`.
|
||||
|
|
|
@ -20,7 +20,7 @@ your description of the issue as detailed as possible:
|
|||
|
||||
When making a code contribution to winit, before opening your pull request, please make sure that:
|
||||
|
||||
- your patch builds with Winit's minimal supported rust version - Rust 1.60.
|
||||
- your patch builds with Winit's minimal supported rust version - Rust 1.64.
|
||||
- you tested your modifications on all the platforms impacted, or if not possible detail which platforms
|
||||
were not tested, and what should be tested, so that a maintainer or another contributor can test them
|
||||
- you updated any relevant documentation in winit
|
||||
|
|
|
@ -10,7 +10,7 @@ readme = "README.md"
|
|||
repository = "https://github.com/rust-windowing/winit"
|
||||
documentation = "https://docs.rs/winit"
|
||||
categories = ["gui"]
|
||||
rust-version = "1.60.0"
|
||||
rust-version = "1.64.0"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["serde"]
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -371,10 +371,11 @@ impl WindowFlags {
|
|||
|
||||
if diff.contains(WindowFlags::CLOSABLE) || new.contains(WindowFlags::CLOSABLE) {
|
||||
let flags = MF_BYCOMMAND
|
||||
| new
|
||||
.contains(WindowFlags::CLOSABLE)
|
||||
.then(|| MF_ENABLED)
|
||||
.unwrap_or(MF_DISABLED);
|
||||
| if new.contains(WindowFlags::CLOSABLE) {
|
||||
MF_ENABLED
|
||||
} else {
|
||||
MF_DISABLED
|
||||
};
|
||||
|
||||
unsafe {
|
||||
EnableMenuItem(GetSystemMenu(window, 0), SC_CLOSE, flags);
|
||||
|
|
Loading…
Reference in a new issue