mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
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 <sean@xobs.io>
This commit is contained in:
parent
ef0ef924c8
commit
cbbc6613c6
1 changed files with 4 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ pub struct ProcessInit {
|
||||||
mod process {
|
mod process {
|
||||||
pub use super::*;
|
pub use super::*;
|
||||||
pub struct ProcessArgs<F: FnOnce()> {
|
pub struct ProcessArgs<F: FnOnce()> {
|
||||||
main: Option<F>,
|
main: F,
|
||||||
name: String,
|
name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,7 +39,7 @@ mod process {
|
||||||
{
|
{
|
||||||
pub fn new(name: &str, main: F) -> ProcessArgs<F> {
|
pub fn new(name: &str, main: F) -> ProcessArgs<F> {
|
||||||
ProcessArgs {
|
ProcessArgs {
|
||||||
main: Some(main),
|
main,
|
||||||
name: name.to_owned(),
|
name: name.to_owned(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -67,7 +67,7 @@ mod process {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_process_post<F>(
|
pub fn create_process_post<F>(
|
||||||
mut args: ProcessArgs<F>,
|
args: ProcessArgs<F>,
|
||||||
init: ProcessInit,
|
init: ProcessInit,
|
||||||
pid: PID,
|
pid: PID,
|
||||||
) -> core::result::Result<ProcessHandle, crate::Error>
|
) -> core::result::Result<ProcessHandle, crate::Error>
|
||||||
|
|
@ -76,7 +76,7 @@ mod process {
|
||||||
{
|
{
|
||||||
let server_address = xous_address();
|
let server_address = xous_address();
|
||||||
|
|
||||||
let f = args.main.take().unwrap();
|
let f = args.main;
|
||||||
let thread_main = std::thread::Builder::new()
|
let thread_main = std::thread::Builder::new()
|
||||||
.name(args.name)
|
.name(args.name)
|
||||||
.spawn(move || {
|
.spawn(move || {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue