kernel: fix pid generation for non-test case

When compiling under non-test scenarios, the `rand` create conflicts
with the new `rand` module.

Disambiguate this field.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-12-04 21:12:18 +08:00
parent 168ffe004e
commit 1f1a535801

View file

@ -60,7 +60,7 @@ pub fn set_send_addr(send_addr: Sender<SocketAddr>) {
#[cfg(not(test))]
fn generate_pid_key() -> [u8; 16] {
use rand::{thread_rng, Rng};
use ::rand::{thread_rng, Rng};
let mut process_key = [0u8; 16];
let mut rng = thread_rng();
for b in process_key.iter_mut() {