Skip to content

Commit c1b3677

Browse files
committed
Fix linter
1 parent 4c120d3 commit c1b3677

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/linalg/basic/matrix.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ impl<'a, T: Debug + Display + Copy + Sized> DenseMatrixView<'a, T> {
106106
let (mrows, mcols) = m.shape();
107107

108108
if is_valid_matrix_window(mrows, mcols, &vrows, &vcols) {
109-
Err(Failed::input(&format!(
109+
Err(Failed::input(
110110
"The specified window is outside of the matrix range"
111-
)))
111+
))
112112
} else {
113113
let (start, end, stride) =
114114
start_end_stride(mrows, mcols, &vrows, &vcols, m.column_major);
@@ -159,9 +159,9 @@ impl<'a, T: Debug + Display + Copy + Sized> DenseMatrixMutView<'a, T> {
159159
) -> Result<Self, Failed> {
160160
let (mrows, mcols) = m.shape();
161161
if is_valid_matrix_window(mrows, mcols, &vrows, &vcols) {
162-
Err(Failed::input(&format!(
162+
Err(Failed::input(
163163
"The specified window is outside of the matrix range"
164-
)))
164+
))
165165
} else {
166166
let (start, end, stride) =
167167
start_end_stride(mrows, mcols, &vrows, &vcols, m.column_major);
@@ -271,9 +271,9 @@ impl<T: Debug + Display + Copy + Sized> DenseMatrix<T> {
271271
);
272272

273273
if values.is_empty() || values[0].is_empty() {
274-
Err(Failed::input(&format!(
274+
Err(Failed::input(
275275
"The 2d vec provided is empty; cannot instantiate the matrix"
276-
)))
276+
))
277277
} else {
278278
let nrows = values.len();
279279
let ncols = values
@@ -384,7 +384,6 @@ where
384384
impl<T: Debug + Display + Copy + Sized> Array<T, (usize, usize)> for DenseMatrix<T> {
385385
fn get(&self, pos: (usize, usize)) -> &T {
386386
let (row, col) = pos;
387-
let idx_target = col * self.nrows + row;
388387

389388
if row >= self.nrows || col >= self.ncols {
390389
panic!(

src/linear/logistic_regression.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,6 @@ mod tests {
821821
assert!(reg_coeff_sum < coeff);
822822
}
823823

824-
825824
//TODO: serialization for the new DenseMatrix needs to be implemented
826825
#[cfg_attr(
827826
all(target_arch = "wasm32", not(target_os = "wasi")),

0 commit comments

Comments
 (0)