mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 22:30:04 -04:00
Bump MSRV to 1.85 and edition to 2024
This commit is contained in:
@@ -2,8 +2,8 @@ use std::error::Error;
|
||||
use std::fmt::{self, Display, Formatter};
|
||||
use std::future::Future;
|
||||
use std::pin::Pin;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::task::{Context, Poll};
|
||||
|
||||
use pin_project::pin_project;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::future;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::mpsc::{self, RecvError, SendError, TryRecvError};
|
||||
use std::sync::Arc;
|
||||
use std::task::Poll;
|
||||
|
||||
use super::AtomicWaker;
|
||||
|
||||
@@ -32,13 +32,10 @@ impl<T> ConcurrentQueue<T> {
|
||||
}
|
||||
|
||||
pub fn pop(&self) -> Result<T, PopError> {
|
||||
self.queue.borrow_mut().pop().ok_or_else(|| {
|
||||
if self.closed.get() {
|
||||
PopError::Closed
|
||||
} else {
|
||||
PopError::Empty
|
||||
}
|
||||
})
|
||||
self.queue
|
||||
.borrow_mut()
|
||||
.pop()
|
||||
.ok_or_else(|| if self.closed.get() { PopError::Closed } else { PopError::Empty })
|
||||
}
|
||||
|
||||
pub fn close(&self) -> bool {
|
||||
|
||||
@@ -6,7 +6,7 @@ use std::rc::Rc;
|
||||
use std::sync::{Arc, Condvar, Mutex};
|
||||
|
||||
use super::super::main_thread::MainThreadMarker;
|
||||
use super::{channel, Receiver, Sender, Wrapper};
|
||||
use super::{Receiver, Sender, Wrapper, channel};
|
||||
|
||||
pub struct Dispatcher<T: 'static>(Wrapper<T, Arc<Sender<Closure<T>>>, Closure<T>>);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ pub(crate) use atomic_waker::AtomicWaker;
|
||||
use concurrent_queue::{ConcurrentQueue, PushError};
|
||||
|
||||
pub use self::abortable::{AbortHandle, Abortable, DropAbortHandle};
|
||||
pub use self::channel::{channel, Receiver, Sender};
|
||||
pub use self::channel::{Receiver, Sender, channel};
|
||||
pub use self::dispatcher::{DispatchRunner, Dispatcher};
|
||||
pub use self::notifier::{Notified, Notifier};
|
||||
pub(crate) use self::wrapper::Wrapper;
|
||||
|
||||
Reference in New Issue
Block a user