Upgrade to the Rust 2024 edition (#2367)

* Update to rust 2024 edition

* Fixes

* Clean up imports

* Cargo fmt again

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Dennis Kobert
2025-03-12 17:29:12 -07:00
committed by GitHub
co-authored by Keavon Chambers
parent 927d7dd9b2
commit beb1c6ae64
253 changed files with 980 additions and 1371 deletions
+20 -22
View File
@@ -187,7 +187,6 @@ macro_rules! impl_slice {
mod slice {
use super::*;
use core::slice::*;
impl_slice!(Iter, IterMut, Chunks, ChunksMut, RChunks, RChunksMut, Windows);
@@ -249,24 +248,24 @@ impl From<()> for Box<dyn DynAny<'static>> {
}
#[cfg(feature = "alloc")]
use alloc::{
borrow::Cow,
boxed::Box,
collections::{BTreeMap, BTreeSet, BinaryHeap, LinkedList, VecDeque},
string::String,
vec::Vec,
};
use alloc::borrow::Cow;
#[cfg(feature = "alloc")]
use alloc::boxed::Box;
#[cfg(feature = "alloc")]
use alloc::collections::{BTreeMap, BTreeSet, BinaryHeap, LinkedList, VecDeque};
#[cfg(feature = "alloc")]
use alloc::string::String;
#[cfg(feature = "alloc")]
use alloc::vec::Vec;
use core::cell::{Cell, RefCell, UnsafeCell};
use core::iter::Empty;
use core::marker::{PhantomData, PhantomPinned};
use core::mem::{ManuallyDrop, MaybeUninit};
use core::num::Wrapping;
use core::ops::Range;
use core::pin::Pin;
use core::sync::atomic::*;
use core::{
cell::{Cell, RefCell, UnsafeCell},
iter::Empty,
marker::{PhantomData, PhantomPinned},
mem::{ManuallyDrop, MaybeUninit},
num::Wrapping,
ops::Range,
pin::Pin,
time::Duration,
};
use core::time::Duration;
impl_type!(
Option<T>, Result<T, E>, Cell<T>, UnsafeCell<T>, RefCell<T>, MaybeUninit<T>,
@@ -286,10 +285,9 @@ impl_type!(
);
#[cfg(feature = "std")]
use std::{
collections::{HashMap, HashSet},
sync::*,
};
use std::collections::{HashMap, HashSet};
#[cfg(feature = "std")]
use std::sync::*;
#[cfg(feature = "std")]
impl_type!(Once, Mutex<T>, RwLock<T>, HashSet<T>, HashMap<K, V>);