I am trying to execute the following code in Rust:
use std::io::Command;
fn main() {
let the_output = Command::new("ruby").arg(["-e", "puts 'raja'", "x"]).output()
}
But it throws this error:
error[E0432]: unresolved import `std::io::Command`
--> src\main.rs:1:5
|
1 | use std::io::Command;
| ^^^^^^^^^^^^^^^^ no `Command` in `io`
Can someone guide me how to import this use std::io::Command;
into my program?