auto merge of #13115 : huonw/rust/rand-errors, r=alexcrichton
move errno -> IoError converter into std, bubble up OSRng errors Also adds a general errno -> `~str` converter to `std::os`, and makes the failure messages for the things using `OSRng` (e.g. (transitively) the task-local RNG, meaning hashmap initialisation failures aren't such a black box).
This commit is contained in:
commit
b71c02e512
20 changed files with 216 additions and 158 deletions
|
|
@ -41,7 +41,7 @@ struct Noise2DContext {
|
|||
|
||||
impl Noise2DContext {
|
||||
fn new() -> Noise2DContext {
|
||||
let mut rng = StdRng::new();
|
||||
let mut rng = StdRng::new().unwrap();
|
||||
|
||||
let mut rgradients = [Vec2 { x: 0.0, y: 0.0 }, ..256];
|
||||
for x in rgradients.mut_iter() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue