diff --git a/src/math/permutation.rs b/src/math/permutation.rs index 32a49fd..62b0731 100644 --- a/src/math/permutation.rs +++ b/src/math/permutation.rs @@ -68,7 +68,9 @@ where self.init = true; return Some(self.p.clone()); } - let Some(i) = (0..&self.p.len() - 1).rfind(|&i| self.p[i] < self.p[i + 1]) else { return None; }; + let Some(i) = (0..&self.p.len() - 1).rfind(|&i| self.p[i] < self.p[i + 1]) else { + return None; + }; let j = self.p.iter().rposition(|x| x > &self.p[i]).unwrap(); self.p.swap(i, j); self.p[i + 1..].reverse();