Skip to content

Commit

Permalink
Fixed clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BhavyeMathur committed Dec 22, 2024
1 parent cc9be2f commit 672d123
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/tensor/equals.rs
Original file line number Diff line number Diff line change
@@ -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<B1, T1, B2, T2> PartialEq<TensorBase<B1>> for TensorBase<B2>
Expand Down
2 changes: 1 addition & 1 deletion src/tensor/iterator/iterators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl<T: RawDataType> FlatIterator<T> for TensorView<T> {

impl<B, T> TensorBase<B>
where
B: DataBuffer<crate::tensor::data_buffer::buffer::DType=T>,
B: DataBuffer<DType=T>,
T: RawDataType,
{
pub fn iter(&self) -> TensorIterator<T> {
Expand Down
2 changes: 1 addition & 1 deletion src/tensor/iterator/util.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::traits::haslength::HasLength;

pub(super) fn split_by_indices<T, I>(data: &Vec<T>, indices: I) -> (Vec<T>, Vec<T>)
pub(super) fn split_by_indices<T, I>(data: &[T], indices: I) -> (Vec<T>, Vec<T>)
where
T: Copy,
I: HasLength + IntoIterator<Item=usize>,
Expand Down
2 changes: 1 addition & 1 deletion src/traits/haslength.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub trait HasLength {

impl<T> HasLength for Vec<T> {
fn len(&self) -> usize {
Vec::len(&self)
Vec::len(self)
}
}
impl<T, const N: usize> HasLength for [T; N] {
Expand Down

0 comments on commit 672d123

Please sign in to comment.