Skip to content

Commit d422e24

Browse files
committed
documentation examples fixes in rustfmt convention
1 parent 7c88bcc commit d422e24

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

library/core/src/ops/bit.rs

+19-11
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ not_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
109109
/// fn bitand(self, Self(rhs): Self) -> Self::Output {
110110
/// let Self(lhs) = self;
111111
/// assert_eq!(lhs.len(), rhs.len());
112-
/// Self(lhs.iter()
112+
/// Self(
113+
/// lhs.iter()
113114
/// .zip(rhs.iter())
114115
/// .map(|(x, y)| *x & *y)
115-
/// .collect())
116+
/// .collect()
117+
/// )
116118
/// }
117119
/// }
118120
///
@@ -207,10 +209,12 @@ bitand_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
207209
/// fn bitor(self, Self(rhs): Self) -> Self::Output {
208210
/// let Self(lhs) = self;
209211
/// assert_eq!(lhs.len(), rhs.len());
210-
/// Self(lhs.iter()
212+
/// Self(
213+
/// lhs.iter()
211214
/// .zip(rhs.iter())
212215
/// .map(|(x, y)| *x | *y)
213-
/// .collect())
216+
/// .collect()
217+
/// )
214218
/// }
215219
/// }
216220
///
@@ -305,10 +309,12 @@ bitor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
305309
/// fn bitxor(self, Self(rhs): Self) -> Self::Output {
306310
/// let Self(lhs) = self;
307311
/// assert_eq!(lhs.len(), rhs.len());
308-
/// Self(lhs.iter()
312+
/// Self(
313+
/// lhs.iter()
309314
/// .zip(rhs.iter())
310315
/// .map(|(x, y)| *x ^ *y)
311-
/// .collect())
316+
/// .collect()
317+
/// )
312318
/// }
313319
/// }
314320
///
@@ -646,11 +652,13 @@ shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
646652
/// // `rhs` is the "right-hand side" of the expression `a &= b`.
647653
/// fn bitand_assign(&mut self, rhs: Self) {
648654
/// assert_eq!(self.0.len(), rhs.0.len());
649-
/// *self = Self(self.0
650-
/// .iter()
651-
/// .zip(rhs.0.iter())
652-
/// .map(|(x, y)| *x & *y)
653-
/// .collect());
655+
/// *self = Self(
656+
/// self.0
657+
/// .iter()
658+
/// .zip(rhs.0.iter())
659+
/// .map(|(x, y)| *x & *y)
660+
/// .collect()
661+
/// );
654662
/// }
655663
/// }
656664
///

0 commit comments

Comments
 (0)