diff --git a/Cargo.toml b/Cargo.toml index 503133b..6d6df4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "orx-concurrent-vec" -version = "3.6.0" +version = "3.7.0" edition = "2024" authors = ["orxfun "] description = "A thread-safe, efficient and lock-free vector allowing concurrent grow, read and update operations." @@ -11,10 +11,10 @@ categories = ["data-structures", "concurrency", "rust-patterns", "no-std"] [dependencies] orx-pseudo-default = { version = "2.1.0", default-features = false } -orx-pinned-vec = "3.16.0" -orx-fixed-vec = "3.16.0" -orx-split-vec = "3.16.0" -orx-pinned-concurrent-col = "2.13.0" +orx-pinned-vec = { version = "3.17.0", default-features = false } +orx-fixed-vec = { version = "3.18.0", default-features = false } +orx-split-vec = { version = "3.18.0", default-features = false } +orx-pinned-concurrent-col = { version = "2.14.0", default-features = false } orx-concurrent-option = "1.5.0" serde = { version = "1.0.219", optional = true, default-features = false } diff --git a/benches/collect_with_extend.rs b/benches/collect_with_extend.rs index 757c031..378b54f 100644 --- a/benches/collect_with_extend.rs +++ b/benches/collect_with_extend.rs @@ -1,5 +1,5 @@ use append_only_vec::AppendOnlyVec; -use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion}; +use criterion::{BenchmarkId, Criterion, black_box, criterion_group, criterion_main}; use orx_concurrent_vec::*; #[allow(dead_code)] diff --git a/benches/collect_with_push.rs b/benches/collect_with_push.rs index 2f711e2..b79fdaf 100644 --- a/benches/collect_with_push.rs +++ b/benches/collect_with_push.rs @@ -1,5 +1,5 @@ use append_only_vec::AppendOnlyVec; -use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion}; +use criterion::{BenchmarkId, Criterion, black_box, criterion_group, criterion_main}; use orx_concurrent_vec::*; #[allow(dead_code)] diff --git a/src/common_traits/debug.rs b/src/common_traits/debug.rs index c7f265b..fd12185 100644 --- a/src/common_traits/debug.rs +++ b/src/common_traits/debug.rs @@ -4,7 +4,7 @@ use orx_fixed_vec::IntoConcurrentPinnedVec; impl Debug for ConcurrentElement { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - self.map(|x| write!(f, "{:?}", x)) + self.map(|x| write!(f, "{x:?}")) } } @@ -37,9 +37,9 @@ where { write!(f, "[")?; if let Some(first) = iter.next() { - first.map(|x| write!(f, "{:?}", x))?; + first.map(|x| write!(f, "{x:?}"))?; for elem in iter { - elem.map(|x| write!(f, ", {:?}", x))?; + elem.map(|x| write!(f, ", {x:?}"))?; } } write!(f, "]") diff --git a/src/common_traits/index.rs b/src/common_traits/index.rs index 253b26d..adbb3fc 100644 --- a/src/common_traits/index.rs +++ b/src/common_traits/index.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentSlice, ConcurrentVec}; +use crate::{ConcurrentSlice, ConcurrentVec, elem::ConcurrentElement}; use core::ops::Index; use orx_pinned_vec::IntoConcurrentPinnedVec; diff --git a/src/common_traits/serde.rs b/src/common_traits/serde.rs index cb2e650..a3f8bef 100644 --- a/src/common_traits/serde.rs +++ b/src/common_traits/serde.rs @@ -2,7 +2,7 @@ use crate::{ConcurrentElement, ConcurrentVec}; use core::marker::PhantomData; use orx_concurrent_option::ConcurrentOption; use orx_fixed_vec::IntoConcurrentPinnedVec; -use serde::{de::Visitor, ser::SerializeSeq, Deserialize, Serialize}; +use serde::{Deserialize, Serialize, de::Visitor, ser::SerializeSeq}; impl Serialize for ConcurrentVec where diff --git a/src/concurrent_slice/iter_shorthands.rs b/src/concurrent_slice/iter_shorthands.rs index 30533e2..2af7843 100644 --- a/src/concurrent_slice/iter_shorthands.rs +++ b/src/concurrent_slice/iter_shorthands.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentSlice}; +use crate::{ConcurrentSlice, elem::ConcurrentElement}; use orx_pinned_vec::IntoConcurrentPinnedVec; impl<'a, T, P> ConcurrentSlice<'a, T, P> diff --git a/src/concurrent_slice/slice.rs b/src/concurrent_slice/slice.rs index 340e705..e3e8e00 100644 --- a/src/concurrent_slice/slice.rs +++ b/src/concurrent_slice/slice.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, helpers::DefaultPinVec, ConcurrentVec}; +use crate::{ConcurrentVec, elem::ConcurrentElement, helpers::DefaultPinVec}; use core::ops::RangeBounds; use orx_fixed_vec::IntoConcurrentPinnedVec; diff --git a/src/concurrent_slice/unsafe_api.rs b/src/concurrent_slice/unsafe_api.rs index f4c3308..b1ac025 100644 --- a/src/concurrent_slice/unsafe_api.rs +++ b/src/concurrent_slice/unsafe_api.rs @@ -344,6 +344,7 @@ where /// /// assert_eq!(&vec, &['a', 'x', 'c', 'd']); /// ``` + #[allow(clippy::mut_from_ref)] pub unsafe fn get_mut(&self, i: usize) -> Option<&mut T> { self.idx(i).and_then(|i| unsafe { self.vec.get_mut(i) }) } diff --git a/src/exclusive.rs b/src/exclusive.rs index b7085e2..3fb576f 100644 --- a/src/exclusive.rs +++ b/src/exclusive.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentVec}; +use crate::{ConcurrentVec, elem::ConcurrentElement}; use orx_pinned_vec::IntoConcurrentPinnedVec; impl ConcurrentVec diff --git a/src/grow.rs b/src/grow.rs index c433a0d..0261988 100644 --- a/src/grow.rs +++ b/src/grow.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentVec}; +use crate::{ConcurrentVec, elem::ConcurrentElement}; use core::sync::atomic::Ordering; use orx_pinned_vec::IntoConcurrentPinnedVec; diff --git a/src/helpers.rs b/src/helpers.rs index 478fb4f..87783e5 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentVec}; +use crate::{ConcurrentVec, elem::ConcurrentElement}; use core::sync::atomic::AtomicUsize; use orx_concurrent_option::{MutHandle, StateU8}; use orx_pinned_vec::IntoConcurrentPinnedVec; diff --git a/src/iter_shorthands.rs b/src/iter_shorthands.rs index 0f50962..0f1b49d 100644 --- a/src/iter_shorthands.rs +++ b/src/iter_shorthands.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentVec}; +use crate::{ConcurrentVec, elem::ConcurrentElement}; use orx_pinned_vec::IntoConcurrentPinnedVec; impl ConcurrentVec diff --git a/src/mut_elem.rs b/src/mut_elem.rs index 54139f5..db9f195 100644 --- a/src/mut_elem.rs +++ b/src/mut_elem.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentVec}; +use crate::{ConcurrentVec, elem::ConcurrentElement}; use orx_concurrent_option::SOME; use orx_pinned_vec::IntoConcurrentPinnedVec; diff --git a/src/partial_eq.rs b/src/partial_eq.rs index 67dfb9b..f43b722 100644 --- a/src/partial_eq.rs +++ b/src/partial_eq.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentVec}; +use crate::{ConcurrentVec, elem::ConcurrentElement}; use orx_pinned_vec::IntoConcurrentPinnedVec; impl ConcurrentVec diff --git a/src/split.rs b/src/split.rs index 9528927..8209373 100644 --- a/src/split.rs +++ b/src/split.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentSlice, ConcurrentVec}; +use crate::{ConcurrentSlice, ConcurrentVec, elem::ConcurrentElement}; use orx_pinned_vec::IntoConcurrentPinnedVec; impl ConcurrentVec diff --git a/src/to_vec.rs b/src/to_vec.rs index 93f6075..f74418e 100644 --- a/src/to_vec.rs +++ b/src/to_vec.rs @@ -1,4 +1,4 @@ -use crate::{elem::ConcurrentElement, ConcurrentVec}; +use crate::{ConcurrentVec, elem::ConcurrentElement}; use alloc::vec::Vec; use orx_pinned_vec::IntoConcurrentPinnedVec; diff --git a/src/unsafe_api.rs b/src/unsafe_api.rs index 1392f80..e721fde 100644 --- a/src/unsafe_api.rs +++ b/src/unsafe_api.rs @@ -360,6 +360,7 @@ where /// /// assert_eq!(&vec, &['a', 'x', 'c', 'd']); /// ``` + #[allow(clippy::mut_from_ref)] pub unsafe fn get_mut(&self, i: usize) -> Option<&mut T> { match i < self.reserved_len() { true => { diff --git a/src/vec.rs b/src/vec.rs index 10606d6..f711abf 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -1,5 +1,5 @@ -use crate::elem::ConcurrentElement; use crate::ConcurrentSlice; +use crate::elem::ConcurrentElement; use crate::{helpers::DefaultPinVec, state::ConcurrentVecState}; use core::ops::RangeBounds; use core::sync::atomic::Ordering;