【发布时间】:2019-04-13 05:45:29
【问题描述】:
我正在尝试在 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; 导入我的程序吗?
【问题讨论】:
标签: rust