mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-08 07:30:36 -04:00
job: Executable names should be passed as AsRef<OsStr> instead of &str
This commit is contained in:
parent
5ae82fa01f
commit
3dfcb471cb
1 changed files with 2 additions and 2 deletions
|
@ -107,7 +107,7 @@ impl JobManager {
|
|||
|
||||
pub async fn run_process(
|
||||
&mut self,
|
||||
executable: &str,
|
||||
executable: impl AsRef<OsStr>,
|
||||
args: &[impl AsRef<OsStr>],
|
||||
operation_name: &str,
|
||||
) -> fdo::Result<zvariant::OwnedObjectPath> {
|
||||
|
@ -176,7 +176,7 @@ impl JobManagerInterface {
|
|||
}
|
||||
|
||||
impl Job {
|
||||
async fn spawn(executable: &str, args: &[impl AsRef<OsStr>]) -> Result<Job> {
|
||||
async fn spawn(executable: impl AsRef<OsStr>, args: &[impl AsRef<OsStr>]) -> Result<Job> {
|
||||
let child = Command::new(executable).args(args).spawn()?;
|
||||
Ok(Job {
|
||||
process: child,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue