Skip to content

Commit 7d54919

Browse files
committed
---
yaml --- r: 95289 b: refs/heads/dist-snap c: a836f13 h: refs/heads/master i: 95287: 06b6bbb v: v3
1 parent 9d688fa commit 7d54919

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 71addded64548ff845d9ef3852a2c1d2592ae39f
9+
refs/heads/dist-snap: a836f13dc0c2c636fd00b77d05f50a00cc3a7c55
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libstd/rand/mod.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,9 @@ pub trait SeedableRng<Seed>: Rng {
535535
///
536536
/// This is a very expensive operation as it has to read randomness
537537
/// from the operating system and use this in an expensive seeding
538-
/// operation. If one does not require high performance, `task_rng`
539-
/// and/or `random` may be more appropriate.
538+
/// operation. If one does not require high performance generation of
539+
/// random numbers, `task_rng` and/or `random` may be more
540+
/// appropriate.
540541
pub fn rng() -> StdRng {
541542
StdRng::new()
542543
}
@@ -596,6 +597,9 @@ impl<'self> SeedableRng<&'self [uint]> for StdRng {
596597
/// consideration for cryptography or security. If you require a specifically
597598
/// seeded `Rng` for consistency over time you should pick one algorithm and
598599
/// create the `Rng` yourself.
600+
///
601+
/// This will read randomness from the operating system to seed the
602+
/// generator.
599603
pub fn weak_rng() -> XorShiftRng {
600604
XorShiftRng::new()
601605
}
@@ -667,8 +671,8 @@ impl XorShiftRng {
667671
break;
668672
}
669673
}
670-
let s: &[u32, ..4] = unsafe { cast::transmute(&s) };
671-
SeedableRng::from_seed(*s)
674+
let s: [u32, ..4] = unsafe { cast::transmute(s) };
675+
SeedableRng::from_seed(s)
672676
}
673677
}
674678

0 commit comments

Comments
 (0)