diff options
author | Andreas Grois <andi@grois.info> | 2022-10-26 23:47:18 +0200 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2022-10-26 23:47:18 +0200 |
commit | 37d19e9e9171c819d92afe395e30359aa059ee15 (patch) | |
tree | 84763e8b9dbaaf98226964bf3cea5b422d37c34b /src | |
parent | 09d9c9e7d8d30c7f718837a44cabc90142f85b3e (diff) |
Minor: Remove an unnecessary clone.
Diffstat (limited to 'src')
-rw-r--r-- | src/passwordmaker/base_conversion/iterative_conversion_impl/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passwordmaker/base_conversion/iterative_conversion_impl/mod.rs b/src/passwordmaker/base_conversion/iterative_conversion_impl/mod.rs index cee5418..71fb3d7 100644 --- a/src/passwordmaker/base_conversion/iterative_conversion_impl/mod.rs +++ b/src/passwordmaker/base_conversion/iterative_conversion_impl/mod.rs @@ -410,7 +410,7 @@ impl<const N : usize> ArbitraryBytes<N>{ //Step D6: We have to correct our guesstimate. It was too large by one. We also have to fix the overflow that has occured. guesstimate -= 1; //The addition must overflow again. The two overflows cancel out, and since we are using wrapping arithmetics, the result becomes correct again. - let did_overflow = slice_overflowing_add_assign(&mut dividend.0[d_range.clone()], &divisor.0[s_range.clone()]); + let did_overflow = slice_overflowing_add_assign(&mut dividend.0[d_range], &divisor.0[s_range]); debug_assert!(did_overflow, "Knuth, TAOCP Vol 2, Chap 4.3.1 exercise 21 says: if this fails, the while above is wrong. Debug.") } quotient.set_digit_from_right(guesstimate, j); |