From f52272c76d51b3fa3b3313e7e3de8fc956fa4cbb Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 12 Jul 2017 09:56:16 -0600 Subject: [PATCH] sim: Flatten 'area' module in mcuboot-sys It isn't necessary for the 'area' module to be exposed. Re-export the two definitions from the crate at the top level, and make the module private. Signed-off-by: David Brown --- sim/mcuboot-sys/src/lib.rs | 7 ++++++- sim/src/main.rs | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sim/mcuboot-sys/src/lib.rs b/sim/mcuboot-sys/src/lib.rs index 2da90ef9..16bd6c33 100644 --- a/sim/mcuboot-sys/src/lib.rs +++ b/sim/mcuboot-sys/src/lib.rs @@ -2,6 +2,11 @@ extern crate libc; #[macro_use] extern crate log; extern crate simflash; -pub mod area; +mod area; pub mod c; + +// The API needs to be public, even though it isn't intended to be called by Rust code, but the +// functions are exported to C code. pub mod api; + +pub use area::{AreaDesc, FlashId}; diff --git a/sim/src/main.rs b/sim/src/main.rs index 61eb2c00..3156b9c0 100644 --- a/sim/src/main.rs +++ b/sim/src/main.rs @@ -24,8 +24,7 @@ mod caps; mod tlv; use simflash::{Flash, SimFlash}; -use mcuboot_sys::area::{AreaDesc, FlashId}; -use mcuboot_sys::c; +use mcuboot_sys::{c, AreaDesc, FlashId}; use caps::Caps; use tlv::TlvGen;