@@ -106,9 +106,9 @@ impl<'a, T: Debug + Display + Copy + Sized> DenseMatrixView<'a, T> {
106
106
let ( mrows, mcols) = m. shape ( ) ;
107
107
108
108
if is_valid_matrix_window ( mrows, mcols, & vrows, & vcols) {
109
- Err ( Failed :: input ( & format ! (
109
+ Err ( Failed :: input (
110
110
"The specified window is outside of the matrix range"
111
- ) ) )
111
+ ) )
112
112
} else {
113
113
let ( start, end, stride) =
114
114
start_end_stride ( mrows, mcols, & vrows, & vcols, m. column_major ) ;
@@ -159,9 +159,9 @@ impl<'a, T: Debug + Display + Copy + Sized> DenseMatrixMutView<'a, T> {
159
159
) -> Result < Self , Failed > {
160
160
let ( mrows, mcols) = m. shape ( ) ;
161
161
if is_valid_matrix_window ( mrows, mcols, & vrows, & vcols) {
162
- Err ( Failed :: input ( & format ! (
162
+ Err ( Failed :: input (
163
163
"The specified window is outside of the matrix range"
164
- ) ) )
164
+ ) )
165
165
} else {
166
166
let ( start, end, stride) =
167
167
start_end_stride ( mrows, mcols, & vrows, & vcols, m. column_major ) ;
@@ -271,9 +271,9 @@ impl<T: Debug + Display + Copy + Sized> DenseMatrix<T> {
271
271
) ;
272
272
273
273
if values. is_empty ( ) || values[ 0 ] . is_empty ( ) {
274
- Err ( Failed :: input ( & format ! (
274
+ Err ( Failed :: input (
275
275
"The 2d vec provided is empty; cannot instantiate the matrix"
276
- ) ) )
276
+ ) )
277
277
} else {
278
278
let nrows = values. len ( ) ;
279
279
let ncols = values
@@ -384,7 +384,6 @@ where
384
384
impl < T : Debug + Display + Copy + Sized > Array < T , ( usize , usize ) > for DenseMatrix < T > {
385
385
fn get ( & self , pos : ( usize , usize ) ) -> & T {
386
386
let ( row, col) = pos;
387
- let idx_target = col * self . nrows + row;
388
387
389
388
if row >= self . nrows || col >= self . ncols {
390
389
panic ! (
0 commit comments