Skip to content

Commit cbbcd9f

Browse files
committed
rustfmt
1 parent 44b4ce1 commit cbbcd9f

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

library/core/src/slice/iter.rs

+4-10
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,8 @@ impl<'a, T> Iter<'a, T> {
9191
unsafe {
9292
assume(!ptr.is_null());
9393

94-
let end = if T::IS_ZST {
95-
ptr.wrapping_byte_add(slice.len())
96-
} else {
97-
ptr.add(slice.len())
98-
};
94+
let end =
95+
if T::IS_ZST { ptr.wrapping_byte_add(slice.len()) } else { ptr.add(slice.len()) };
9996

10097
Self { ptr: NonNull::new_unchecked(ptr as *mut T), end, _marker: PhantomData }
10198
}
@@ -227,11 +224,8 @@ impl<'a, T> IterMut<'a, T> {
227224
unsafe {
228225
assume(!ptr.is_null());
229226

230-
let end = if T::IS_ZST {
231-
ptr.wrapping_byte_add(slice.len())
232-
} else {
233-
ptr.add(slice.len())
234-
};
227+
let end =
228+
if T::IS_ZST { ptr.wrapping_byte_add(slice.len()) } else { ptr.add(slice.len()) };
235229

236230
Self { ptr: NonNull::new_unchecked(ptr), end, _marker: PhantomData }
237231
}

0 commit comments

Comments
 (0)