From cbbc6613c6a2af6364c18a94f74cdb7c92b73c5f Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 30 Jul 2020 14:55:02 +0800 Subject: [PATCH] xous: hosted: remove Option<> from ProcessArgs There is no reason to make this an Option, since it will always exist. Signed-off-by: Sean Cross --- xous-rs/src/arch/hosted.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xous-rs/src/arch/hosted.rs b/xous-rs/src/arch/hosted.rs index 069730b0d..112fd0a77 100644 --- a/xous-rs/src/arch/hosted.rs +++ b/xous-rs/src/arch/hosted.rs @@ -29,7 +29,7 @@ pub struct ProcessInit { mod process { pub use super::*; pub struct ProcessArgs { - main: Option, + main: F, name: String, } @@ -39,7 +39,7 @@ mod process { { pub fn new(name: &str, main: F) -> ProcessArgs { ProcessArgs { - main: Some(main), + main, name: name.to_owned(), } } @@ -67,7 +67,7 @@ mod process { } pub fn create_process_post( - mut args: ProcessArgs, + args: ProcessArgs, init: ProcessInit, pid: PID, ) -> core::result::Result @@ -76,7 +76,7 @@ mod process { { let server_address = xous_address(); - let f = args.main.take().unwrap(); + let f = args.main; let thread_main = std::thread::Builder::new() .name(args.name) .spawn(move || {