1个稳定版本
1.0.0 | 2022年11月7日 |
---|
#1068 在 数据结构 中
在 2 个crate中使用(通过 cotton)
7KB
114 行
构建命令参数。
use std::process::Command;
use mkargs::mkargs;
let world = "world".to_string();
let mut args = mkargs!["hello", world];
args.push_pair("foo", "bar");
Command::new("echo")
.args(&*args)
.spawn()
.expect("echo command failed to start");
lib.rs
:
构建命令参数。
use std::process::Command;
use mkargs::mkargs;
let world = "world".to_string();
let mut args = mkargs!["hello", world];
args.push_pair("foo", "bar");
Command::new("echo")
.args(&*args)
.spawn()
.expect("echo command failed to start");