我正在尝试在Rust中执行以下代码:
use std::io::Command;
fn main() {
let the_output = Command::new("ruby").arg(["-e", "puts 'raja'", "x"]).output()
}
但是它抛出了这个错误:
error[E0432]: unresolved import `std::io::Command`
--> src\main.rs:1:5
|
1 | use std::io::Command;
| ^^^^^^^^^^^^^^^^ no `Command` in `io`
有人可以指导我如何将此use std::io::Command;
导入到我的程序中吗?