mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 14:49:07 -04:00
Bump MSRV to 1.85 and edition to 2024
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use std::cell::Cell;
|
||||
use std::collections::VecDeque;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{mpsc, Arc, Mutex};
|
||||
use std::sync::{Arc, Mutex, mpsc};
|
||||
use std::time::Instant;
|
||||
use std::{iter, mem, slice};
|
||||
|
||||
@@ -133,11 +133,7 @@ fn convert_scancode(scancode: u8) -> (PhysicalKey, Option<NamedKey>) {
|
||||
}
|
||||
|
||||
fn element_state(pressed: bool) -> event::ElementState {
|
||||
if pressed {
|
||||
event::ElementState::Pressed
|
||||
} else {
|
||||
event::ElementState::Released
|
||||
}
|
||||
if pressed { event::ElementState::Pressed } else { event::ElementState::Released }
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
|
||||
@@ -8,9 +8,7 @@ use std::{fmt, str};
|
||||
pub use self::event_loop::{EventLoop, PlatformSpecificEventLoopAttributes};
|
||||
|
||||
macro_rules! os_error {
|
||||
($error:expr) => {{
|
||||
winit_core::error::OsError::new(line!(), file!(), $error)
|
||||
}};
|
||||
($error:expr) => {{ winit_core::error::OsError::new(line!(), file!(), $error) }};
|
||||
}
|
||||
|
||||
pub mod event_loop;
|
||||
@@ -41,20 +39,12 @@ impl RedoxSocket {
|
||||
|
||||
fn read(&self, buf: &mut [u8]) -> syscall::Result<()> {
|
||||
let count = syscall::read(self.fd, buf)?;
|
||||
if count == buf.len() {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(syscall::Error::new(syscall::EINVAL))
|
||||
}
|
||||
if count == buf.len() { Ok(()) } else { Err(syscall::Error::new(syscall::EINVAL)) }
|
||||
}
|
||||
|
||||
fn write(&self, buf: &[u8]) -> syscall::Result<()> {
|
||||
let count = syscall::write(self.fd, buf)?;
|
||||
if count == buf.len() {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(syscall::Error::new(syscall::EINVAL))
|
||||
}
|
||||
if count == buf.len() { Ok(()) } else { Err(syscall::Error::new(syscall::EINVAL)) }
|
||||
}
|
||||
|
||||
fn fpath<'a>(&self, buf: &'a mut [u8]) -> syscall::Result<&'a str> {
|
||||
|
||||
Reference in New Issue
Block a user