diff --git a/src/tensor/equals.rs b/src/tensor/equals.rs index f6784f4..53e70b4 100644 --- a/src/tensor/equals.rs +++ b/src/tensor/equals.rs @@ -1,6 +1,6 @@ use crate::data_buffer::DataBuffer; use crate::dtype::RawDataType; -use crate::iterator::iterators::FlatIterator; +use crate::iterator::FlatIterator; use crate::TensorBase; impl PartialEq> for TensorBase diff --git a/src/tensor/iterator/iterators.rs b/src/tensor/iterator/iterators.rs index 0f64e12..1b8a995 100644 --- a/src/tensor/iterator/iterators.rs +++ b/src/tensor/iterator/iterators.rs @@ -29,7 +29,7 @@ impl FlatIterator for TensorView { impl TensorBase where - B: DataBuffer, + B: DataBuffer, T: RawDataType, { pub fn iter(&self) -> TensorIterator { diff --git a/src/tensor/iterator/util.rs b/src/tensor/iterator/util.rs index 409b4dd..bd742c5 100644 --- a/src/tensor/iterator/util.rs +++ b/src/tensor/iterator/util.rs @@ -1,6 +1,6 @@ use crate::traits::haslength::HasLength; -pub(super) fn split_by_indices(data: &Vec, indices: I) -> (Vec, Vec) +pub(super) fn split_by_indices(data: &[T], indices: I) -> (Vec, Vec) where T: Copy, I: HasLength + IntoIterator, diff --git a/src/traits/haslength.rs b/src/traits/haslength.rs index f440294..4ea4574 100644 --- a/src/traits/haslength.rs +++ b/src/traits/haslength.rs @@ -4,7 +4,7 @@ pub trait HasLength { impl HasLength for Vec { fn len(&self) -> usize { - Vec::len(&self) + Vec::len(self) } } impl HasLength for [T; N] {