Skip to content

Commit 3e14f7a

Browse files
committed
Use slice syntax instead of slice_to, etc.
1 parent a457c03 commit 3e14f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ pub trait Rng {
230230
/// let choices = [1i, 2, 4, 8, 16, 32];
231231
/// let mut rng = task_rng();
232232
/// println!("{}", rng.choose(choices));
233-
/// assert_eq!(rng.choose(choices.slice_to(0)), None);
233+
/// assert_eq!(rng.choose(choices[..0]), None);
234234
/// ```
235235
fn choose<'a, T>(&mut self, values: &'a [T]) -> Option<&'a T> {
236236
if values.is_empty() {

0 commit comments

Comments
 (0)