Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuchsia: magenta was renamed zircon #173

Merged
merged 1 commit into from
Oct 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ log = "0.3.0"
members = ["rand-derive"]

[target.'cfg(target_os = "fuchsia")'.dependencies]
magenta = "^0.1.1"
fuchsia-zircon = "^0.2.1"
6 changes: 3 additions & 3 deletions src/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ mod imp {

#[cfg(target_os = "fuchsia")]
mod imp {
extern crate magenta;
extern crate fuchsia_zircon;

use std::io;
use Rng;
Expand All @@ -407,10 +407,10 @@ mod imp {
next_u64(&mut |v| self.fill_bytes(v))
}
fn fill_bytes(&mut self, v: &mut [u8]) {
for s in v.chunks_mut(magenta::MX_CPRNG_DRAW_MAX_LEN) {
for s in v.chunks_mut(fuchsia_zircon::ZX_CPRNG_DRAW_MAX_LEN) {
let mut filled = 0;
while filled < s.len() {
match magenta::cprng_draw(&mut s[filled..]) {
match fuchsia_zircon::cprng_draw(&mut s[filled..]) {
Ok(actual) => filled += actual,
Err(e) => panic!("cprng_draw failed: {:?}", e),
};
Expand Down