chiark / gitweb /
Formatting
authorSimon Tatham <anakin@pobox.com>
Sun, 13 Apr 2025 07:03:51 +0000 (08:03 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 13 Apr 2025 07:03:51 +0000 (08:03 +0100)
src/finitenimber.rs

index 782ff21b1d037de1f41aea2408f30b546af98add..af4798806eda610d9f036e4d7ca61ac42c662fc2 100644 (file)
@@ -132,7 +132,10 @@ impl<'a> FiniteNimberRef<'a> {
         match self {
             FiniteNimberRef::Single(v) => word_level(v),
             FiniteNimberRef::Slice(s) => {
-                let w = s.len().checked_sub(1).expect("slice representation must always be non-empty");
+                let w = s
+                    .len()
+                    .checked_sub(1)
+                    .expect("slice representation must always be non-empty");
                 match w {
                     0 => word_level(s[0]),
                     w => usize_level(w) + (WORDLEVELS + 1),
@@ -376,7 +379,8 @@ macro_rules! impl_binop_wrappers {
 impl<'a, 'b> Add<FiniteNimberRef<'a>> for FiniteNimberRef<'b> {
     type Output = FiniteNimber;
     fn add(self, other: FiniteNimberRef<'a>) -> FiniteNimber {
-        let vec: Vec<_> = self.as_slice()
+        let vec: Vec<_> = self
+            .as_slice()
             .iter()
             .cloned()
             .zip_longest(other.as_slice().iter().cloned())