From cc5a4e92ce85153bd625119dbad5c6ec61dcb65f Mon Sep 17 00:00:00 2001 From: Paul Sajna <paulsajna@gmail.com> Date: Tue, 20 Mar 2018 19:45:45 -0700 Subject: [PATCH] fmt --- src/stdlib/src/lib.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/stdlib/src/lib.rs b/src/stdlib/src/lib.rs index 8a5535f7..acc68d08 100644 --- a/src/stdlib/src/lib.rs +++ b/src/stdlib/src/lib.rs @@ -2,9 +2,7 @@ #![feature(core_intrinsics)] #![feature(global_allocator)] - ///! stdlib implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/stdlib.h.html - extern crate ctype; extern crate errno; extern crate platform; @@ -12,7 +10,7 @@ extern crate ralloc; extern crate rand; use core::{ptr, str}; -use rand::{Rng, XorShiftRng, SeedableRng}; +use rand::{Rng, SeedableRng, XorShiftRng}; use errno::*; use platform::types::*; @@ -382,15 +380,13 @@ pub extern "C" fn qsort( #[no_mangle] pub unsafe extern "C" fn rand() -> c_int { match RNG { - Some(ref mut rng) => { - rng.gen_range::<c_int>(0, RAND_MAX) - }, + Some(ref mut rng) => rng.gen_range::<c_int>(0, RAND_MAX), None => { let mut rng = XorShiftRng::from_seed([1; 16]); let ret = rng.gen_range::<c_int>(0, RAND_MAX); RNG = Some(rng); ret - }, + } } } -- GitLab