Skip to content

Commit 828086c

Browse files
authored
Merge pull request #76 from adamcrume/master
Mark Tensor::data() and data_mut() as deprecated
2 parents e6f3339 + 4f8fe28 commit 828086c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -877,11 +877,13 @@ impl<T: TensorType> Tensor<T> {
877877
}
878878

879879
/// Returns the tensor's data.
880+
#[deprecated(note="Deref the tensor as a slice instead.")]
880881
pub fn data(&self) -> &Buffer<T> {
881882
&self.data
882883
}
883884

884885
/// Returns the tensor's data.
886+
#[deprecated(note="Deref the tensor as a slice instead.")]
885887
pub fn data_mut(&mut self) -> &mut Buffer<T> {
886888
&mut self.data
887889
}

0 commit comments

Comments
 (0)