Skip to content

Commit 4b32e26

Browse files
authored
Merge pull request #20 from orxfun/ConcurrentOption-version-upgraded
ConcurrentOption version upgraded
2 parents b5fd9b5 + 6313ee5 commit 4b32e26

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "orx-concurrent-vec"
3-
version = "2.3.0"
3+
version = "2.4.0"
44
edition = "2021"
55
authors = ["orxfun <[email protected]>"]
66
description = "An efficient, convenient and lightweight grow-only read & write concurrent data structure allowing high performance concurrent collection."
@@ -15,7 +15,7 @@ orx-pinned-vec = "3.3"
1515
orx-fixed-vec = "3.3"
1616
orx-split-vec = "3.3"
1717
orx-pinned-concurrent-col = "2.3"
18-
orx-concurrent-option = "1.0"
18+
orx-concurrent-option = "1.1"
1919

2020
[dev-dependencies]
2121
orx-concurrent-bag = "2.3"

src/vec.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,19 +1092,19 @@ where
10921092
/// use orx_concurrent_vec::*;
10931093
///
10941094
/// let vec = ConcurrentVec::new();
1095-
/// assert!(vec.raw_get(0).is_none());
1095+
/// assert!(vec.get_raw(0).is_none());
10961096
///
10971097
/// vec.push('a');
1098-
/// let p = vec.raw_get(0).unwrap();
1098+
/// let p = vec.get_raw(0).unwrap();
10991099
///
11001100
/// vec.extend(['b', 'c', 'd', 'e']);
11011101
///
11021102
/// assert_eq!(unsafe { p.as_ref() }, Some(&'a'));
1103-
pub fn raw_get(&self, index: usize) -> Option<*const T> {
1103+
pub fn get_raw(&self, index: usize) -> Option<*const T> {
11041104
match index < self.len() {
11051105
true => {
11061106
let maybe = unsafe { self.core.get(index) };
1107-
maybe.and_then(|x| x.raw_get_with_order(Ordering::SeqCst))
1107+
maybe.and_then(|x| x.get_raw_with_order(Ordering::SeqCst))
11081108
}
11091109
false => None,
11101110
}
@@ -1128,22 +1128,22 @@ where
11281128
/// use orx_concurrent_vec::*;
11291129
///
11301130
/// let vec = ConcurrentVec::new();
1131-
/// assert!(vec.raw_get_mut(0).is_none());
1131+
/// assert!(vec.get_raw_mut(0).is_none());
11321132
///
11331133
/// vec.push('a');
1134-
/// let p = vec.raw_get_mut(0).unwrap();
1134+
/// let p = vec.get_raw_mut(0).unwrap();
11351135
///
11361136
/// vec.extend(['b', 'c', 'd', 'e']);
11371137
///
11381138
/// assert_eq!(unsafe { p.as_ref() }, Some(&'a'));
11391139
///
11401140
/// unsafe { p.write('x') };
11411141
/// assert_eq!(unsafe { p.as_ref() }, Some(&'x'));
1142-
pub fn raw_get_mut(&self, index: usize) -> Option<*mut T> {
1142+
pub fn get_raw_mut(&self, index: usize) -> Option<*mut T> {
11431143
match index < self.len() {
11441144
true => {
11451145
let maybe = unsafe { self.core.get(index) };
1146-
maybe.and_then(|x| x.raw_get_mut_with_order(Ordering::SeqCst))
1146+
maybe.and_then(|x| x.get_raw_mut_with_order(Ordering::SeqCst))
11471147
}
11481148
false => None,
11491149
}

0 commit comments

Comments
 (0)