diff --git a/src/oned/one_d_reader.rs b/src/oned/one_d_reader.rs index 46791d6..67803fd 100644 --- a/src/oned/one_d_reader.rs +++ b/src/oned/one_d_reader.rs @@ -81,7 +81,7 @@ pub trait OneDReader: Reader { // Estimate black point for this row and load it: let mut row = if let Ok(res) = image.getBlackRow(rowNumber as usize) { - res.into_owned() + res } else { continue; }; @@ -97,7 +97,7 @@ pub trait OneDReader: Reader { // for (int attempt = 0; attempt < 2; attempt++) { if attempt == 1 { // trying again? - row.reverse(); // reverse the row and continue + row.to_mut().reverse(); // reverse the row and continue // This means we will only ever draw result points *once* in the life of this method // since we want to avoid drawing the wrong points after flipping the row, and, // don't want to clutter with noise from every single row scan -- just the scans diff --git a/src/oned/rss/expanded/rss_expanded_stacked_internal_test_case.rs b/src/oned/rss/expanded/rss_expanded_stacked_internal_test_case.rs index 3e54774..2b32ac2 100644 --- a/src/oned/rss/expanded/rss_expanded_stacked_internal_test_case.rs +++ b/src/oned/rss/expanded/rss_expanded_stacked_internal_test_case.rs @@ -76,6 +76,7 @@ fn testDecodingRowByRow() { .getBlackRow(secondRowNumber) .expect("get row") .into_owned(); + secondRow.reverse(); let totalPairs = rssExpandedReader