Remove rand(), fixes #50
This commit is contained in:
@ -6,5 +6,4 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
embassy = { version = "0.1.0", path = "../embassy", features = ["std"] }
|
||||
lazy_static = "1.4.0"
|
||||
rand_core = { version = "0.6.0", features = ["std"] }
|
||||
lazy_static = "1.4.0"
|
@ -1,7 +1,6 @@
|
||||
use embassy::executor::{raw, Spawner};
|
||||
use embassy::time::TICKS_PER_SECOND;
|
||||
use embassy::time::{Alarm, Clock};
|
||||
use rand_core::{OsRng, RngCore};
|
||||
use std::marker::PhantomData;
|
||||
use std::mem::MaybeUninit;
|
||||
use std::ptr;
|
||||
@ -19,13 +18,6 @@ impl Clock for StdClock {
|
||||
}
|
||||
}
|
||||
|
||||
struct StdRand;
|
||||
impl embassy::rand::Rand for StdRand {
|
||||
fn rand(&self, buf: &mut [u8]) {
|
||||
OsRng.fill_bytes(buf);
|
||||
}
|
||||
}
|
||||
|
||||
static mut ALARM_AT: u64 = u64::MAX;
|
||||
|
||||
pub struct StdAlarm;
|
||||
@ -101,7 +93,6 @@ impl Executor {
|
||||
unsafe {
|
||||
CLOCK_ZERO.as_mut_ptr().write(StdInstant::now());
|
||||
embassy::time::set_clock(&StdClock);
|
||||
embassy::rand::set_rand(&StdRand);
|
||||
}
|
||||
|
||||
Self {
|
||||
|
Reference in New Issue
Block a user