diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-31 10:15:35 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-31 15:49:11 -0700 |
| commit | 6d2c640cf00aad6345bd93b0b64c8b3d3d2fcf50 (patch) | |
| tree | bd5aad8208dbc01ab2834d2a1e0444444ce18959 /src/librand/lib.rs | |
| parent | 5e0bda0448283c3045c1e96b99e90ebbc3746e12 (diff) | |
| parent | df65f59fe9dd856c96a383c01067a176fee0dbb6 (diff) | |
| download | rust-6d2c640cf00aad6345bd93b0b64c8b3d3d2fcf50.tar.gz rust-6d2c640cf00aad6345bd93b0b64c8b3d3d2fcf50.zip | |
rollup merge of #23886: demelev/remove_as_slice_usage
Diffstat (limited to 'src/librand/lib.rs')
| -rw-r--r-- | src/librand/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librand/lib.rs b/src/librand/lib.rs index 85f3c621c7e..d859f1c109e 100644 --- a/src/librand/lib.rs +++ b/src/librand/lib.rs @@ -154,7 +154,7 @@ pub trait Rng : Sized { /// /// let mut v = [0; 13579]; /// thread_rng().fill_bytes(&mut v); - /// println!("{:?}", v.as_slice()); + /// println!("{:?}", v); /// ``` fn fill_bytes(&mut self, dest: &mut [u8]) { // this could, in theory, be done by transmuting dest to a @@ -310,9 +310,9 @@ pub trait Rng : Sized { /// let mut rng = thread_rng(); /// let mut y = [1, 2, 3]; /// rng.shuffle(&mut y); - /// println!("{:?}", y.as_slice()); + /// println!("{:?}", y); /// rng.shuffle(&mut y); - /// println!("{:?}", y.as_slice()); + /// println!("{:?}", y); /// ``` fn shuffle<T>(&mut self, values: &mut [T]) { let mut i = values.len(); |
