mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-08 15:40:34 -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(
|
pub async fn run_process(
|
||||||
&mut self,
|
&mut self,
|
||||||
executable: &str,
|
executable: impl AsRef<OsStr>,
|
||||||
args: &[impl AsRef<OsStr>],
|
args: &[impl AsRef<OsStr>],
|
||||||
operation_name: &str,
|
operation_name: &str,
|
||||||
) -> fdo::Result<zvariant::OwnedObjectPath> {
|
) -> fdo::Result<zvariant::OwnedObjectPath> {
|
||||||
|
@ -176,7 +176,7 @@ impl JobManagerInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Job {
|
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()?;
|
let child = Command::new(executable).args(args).spawn()?;
|
||||||
Ok(Job {
|
Ok(Job {
|
||||||
process: child,
|
process: child,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue