Skip to content

Commit b1344ab

Browse files
committed
code style fixes
1 parent bdf8630 commit b1344ab

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/libcore/cell.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,12 @@ impl<T: ?Sized> Cell<T> {
507507
/// ```
508508
/// #![feature(as_cell)]
509509
/// use std::cell::Cell;
510-
/// let slice: &mut [i32] = &mut [1,2,3];
510+
///
511+
/// let slice: &mut [i32] = &mut [1, 2, 3];
511512
/// let cell_slice: &Cell<[i32]> = Cell::from_mut(slice);
512513
/// assert_eq!(cell_slice.len(), 3);
513-
/// let slice_cell : &[Cell<i32>] = &cell_slice[..];
514+
///
515+
/// let slice_cell: &[Cell<i32>] = &cell_slice[..];
514516
/// assert_eq!(slice_cell.len(), 3);
515517
/// ```
516518
#[inline]

src/test/run-pass/rfc-1789-as-cell/from-mut.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
use std::cell::Cell;
1414

1515
fn main() {
16-
let slice: &mut [i32] = &mut [1,2,3];
16+
let slice: &mut [i32] = &mut [1, 2, 3];
1717
let cell_slice: &Cell<[i32]> = Cell::from_mut(slice);
1818
assert_eq!(cell_slice.len(), 3);
19-
let sub_slice : &[Cell<i32>] = &cell_slice[1..];
19+
20+
let sub_slice: &[Cell<i32>] = &cell_slice[1..];
2021
assert_eq!(sub_slice.len(), 2);
2122
}

0 commit comments

Comments
 (0)