File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
branches/try2/src/libstd/rand Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 71addded64548ff845d9ef3852a2c1d2592ae39f
8
+ refs/heads/try2: a836f13dc0c2c636fd00b77d05f50a00cc3a7c55
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -535,8 +535,9 @@ pub trait SeedableRng<Seed>: Rng {
535
535
///
536
536
/// This is a very expensive operation as it has to read randomness
537
537
/// 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.
540
541
pub fn rng ( ) -> StdRng {
541
542
StdRng :: new ( )
542
543
}
@@ -596,6 +597,9 @@ impl<'self> SeedableRng<&'self [uint]> for StdRng {
596
597
/// consideration for cryptography or security. If you require a specifically
597
598
/// seeded `Rng` for consistency over time you should pick one algorithm and
598
599
/// create the `Rng` yourself.
600
+ ///
601
+ /// This will read randomness from the operating system to seed the
602
+ /// generator.
599
603
pub fn weak_rng ( ) -> XorShiftRng {
600
604
XorShiftRng :: new ( )
601
605
}
@@ -667,8 +671,8 @@ impl XorShiftRng {
667
671
break;
668
672
}
669
673
}
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 )
672
676
}
673
677
}
674
678
You can’t perform that action at this time.
0 commit comments