fix: use Result instead Option for runtime builder in get_work_path
Some checks are pending
BotServer CI/CD / build (push) Waiting to run
Some checks are pending
BotServer CI/CD / build (push) Waiting to run
This commit is contained in:
parent
b2a9c8213d
commit
4bdf46bdfc
1 changed files with 2 additions and 2 deletions
|
|
@ -92,9 +92,9 @@ pub fn get_work_path() -> String {
|
|||
.enable_all()
|
||||
.build();
|
||||
let result = match rt {
|
||||
Some(rt) => rt.block_on(sm.get_value("gbo/app", "work_path"))
|
||||
Ok(rt) => rt.block_on(sm.get_value("gbo/app", "work_path"))
|
||||
.unwrap_or_else(|_| "./work".to_string()),
|
||||
None => "./work".to_string(),
|
||||
Err(_) => "./work".to_string(),
|
||||
};
|
||||
let _ = tx.send(result);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue