Skip to content

Commit 8fec0eb

Browse files
committed
API: Remove RcArray (deprecated alias of ArcArray)
1 parent dd06116 commit 8fec0eb

File tree

5 files changed

+8
-34
lines changed

5 files changed

+8
-34
lines changed

src/aliases.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
use crate::dimension::Dim;
55
#[allow(deprecated)]
6-
use crate::{ArcArray, Array, ArrayView, ArrayViewMut, Ix, IxDynImpl, RcArray};
6+
use crate::{ArcArray, Array, ArrayView, ArrayViewMut, Ix, IxDynImpl};
77

88
/// Create a zero-dimensional index
99
#[allow(non_snake_case)]
@@ -150,15 +150,6 @@ pub type ArrayViewMut6<'a, A> = ArrayViewMut<'a, A, Ix6>;
150150
/// dynamic-dimensional read-write array view
151151
pub type ArrayViewMutD<'a, A> = ArrayViewMut<'a, A, IxDyn>;
152152

153-
/// one-dimensional shared ownership array
154-
#[allow(deprecated)]
155-
#[deprecated(note = "`RcArray` has been renamed to `ArcArray`")]
156-
pub type RcArray1<A> = RcArray<A, Ix1>;
157-
/// two-dimensional shared ownership array
158-
#[allow(deprecated)]
159-
#[deprecated(note = "`RcArray` has been renamed to `ArcArray`")]
160-
pub type RcArray2<A> = RcArray<A, Ix2>;
161-
162153
/// one-dimensional shared ownership array
163154
pub type ArcArray1<A> = ArcArray<A, Ix1>;
164155
/// two-dimensional shared ownership array

src/data_traits.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::ptr::NonNull;
1414
use std::sync::Arc;
1515

1616
use crate::{
17-
ArrayBase, CowRepr, Dimension, OwnedArcRepr, OwnedRcRepr, OwnedRepr, RawViewRepr, ViewRepr,
17+
ArrayBase, CowRepr, Dimension, OwnedArcRepr, OwnedRepr, RawViewRepr, ViewRepr,
1818
};
1919

2020
/// Array representation trait.
@@ -397,7 +397,7 @@ pub unsafe trait DataOwned: Data {
397397
/// Converts the data representation to a shared (copy on write)
398398
/// representation, without any copying.
399399
#[doc(hidden)]
400-
fn into_shared(self) -> OwnedRcRepr<Self::Elem>;
400+
fn into_shared(self) -> OwnedArcRepr<Self::Elem>;
401401
}
402402

403403
/// Array representation trait.
@@ -407,14 +407,14 @@ pub unsafe trait DataOwned: Data {
407407
/// ***Internal trait, see `Data`.***
408408
pub unsafe trait DataShared: Clone + Data + RawDataClone {}
409409

410-
unsafe impl<A> DataShared for OwnedRcRepr<A> {}
410+
unsafe impl<A> DataShared for OwnedArcRepr<A> {}
411411
unsafe impl<'a, A> DataShared for ViewRepr<&'a A> {}
412412

413413
unsafe impl<A> DataOwned for OwnedRepr<A> {
414414
fn new(elements: Vec<A>) -> Self {
415415
OwnedRepr::from(elements)
416416
}
417-
fn into_shared(self) -> OwnedRcRepr<A> {
417+
fn into_shared(self) -> OwnedArcRepr<A> {
418418
OwnedArcRepr(Arc::new(self))
419419
}
420420
}
@@ -424,7 +424,7 @@ unsafe impl<A> DataOwned for OwnedArcRepr<A> {
424424
OwnedArcRepr(Arc::new(OwnedRepr::from(elements)))
425425
}
426426

427-
fn into_shared(self) -> OwnedRcRepr<A> {
427+
fn into_shared(self) -> OwnedArcRepr<A> {
428428
self
429429
}
430430
}

src/impl_methods.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ where
13631363
where
13641364
S: RawDataMut,
13651365
{
1366-
self.try_ensure_unique(); // for RcArray
1366+
self.try_ensure_unique(); // for ArcArray
13671367
self.ptr.as_ptr()
13681368
}
13691369

@@ -1379,7 +1379,7 @@ where
13791379
where
13801380
S: RawDataMut,
13811381
{
1382-
self.try_ensure_unique(); // for RcArray
1382+
self.try_ensure_unique(); // for ArcArray
13831383
unsafe { RawArrayViewMut::new(self.ptr, self.dim.clone(), self.strides.clone()) }
13841384
}
13851385

src/lib.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,14 +1241,6 @@ where
12411241
strides: D,
12421242
}
12431243

1244-
/// An array where the data has shared ownership and is copy on write.
1245-
///
1246-
/// It can act as both an owner as the data as well as a shared reference (view like).
1247-
///
1248-
/// **Note: this type alias is obsolete.** See the equivalent [`ArcArray`] instead.
1249-
#[deprecated(note = "`RcArray` has been renamed to `ArcArray`")]
1250-
pub type RcArray<A, D> = ArrayBase<OwnedRcRepr<A>, D>;
1251-
12521244
/// An array where the data has shared ownership and is copy on write.
12531245
///
12541246
/// The `ArcArray<A, D>` is parameterized by `A` for the element type and `D` for
@@ -1399,14 +1391,6 @@ pub type RawArrayViewMut<A, D> = ArrayBase<RawViewRepr<*mut A>, D>;
13991391

14001392
pub use data_repr::OwnedRepr;
14011393

1402-
1403-
/// RcArray's representation.
1404-
///
1405-
/// *Don’t use this type directly—use the type alias
1406-
/// [`RcArray`](type.RcArray.html) for the array type!*
1407-
#[deprecated(note = "RcArray is replaced by ArcArray")]
1408-
pub use self::OwnedArcRepr as OwnedRcRepr;
1409-
14101394
/// ArcArray's representation.
14111395
///
14121396
/// *Don’t use this type directly—use the type alias

src/prelude.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#[allow(deprecated)]
2121
pub use crate::{
2222
ArcArray, Array, ArrayBase, ArrayView, ArrayViewMut, CowArray, RawArrayView, RawArrayViewMut,
23-
RcArray,
2423
};
2524

2625
#[doc(no_inline)]

0 commit comments

Comments
 (0)