Skip to content

Commit

Permalink
Deprecate the DataClone trait
Browse files Browse the repository at this point in the history
We'll replace `DataClone` with a trait alias once that feature becomes
available on stable.
  • Loading branch information
jturner314 committed Nov 19, 2018
1 parent 1f0fc55 commit d859bfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/data_traits.rs
Expand Up @@ -133,8 +133,10 @@ pub unsafe trait DataMut : Data + DataRawMut {
/// accessed with safe code.
///
/// ***Internal trait, see `Data`.***
#[deprecated(note="use `Data + DataRawClone` instead", since="0.12.1")]
pub trait DataClone : Data + DataRawClone {}

#[allow(deprecated)]
impl<T> DataClone for T where T: Data + DataRawClone {}

unsafe impl<A> DataRaw for RawViewRepr<*const A> {
Expand Down Expand Up @@ -387,7 +389,7 @@ pub unsafe trait DataOwned : Data {
/// A representation that is a lightweight view.
///
/// ***Internal trait, see `Data`.***
pub unsafe trait DataShared : Clone + DataClone { }
pub unsafe trait DataShared : Clone + Data + DataRawClone { }

unsafe impl<A> DataShared for OwnedRcRepr<A> {}
unsafe impl<'a, A> DataShared for ViewRepr<&'a A> {}
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Expand Up @@ -151,6 +151,7 @@ mod data_traits;

pub use aliases::*;

#[allow(deprecated)]
pub use data_traits::{
DataRaw,
DataRawMut,
Expand Down

0 comments on commit d859bfa

Please sign in to comment.