Bump MSRV to 1.85 and edition to 2024

This commit is contained in:
Kirill Chibisov
2025-10-19 12:58:12 +09:00
parent 10f21090ce
commit c333003514
110 changed files with 432 additions and 574 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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>>);

View File

@@ -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;