Hi, maybe is a my mistake, but i cant use the String type with 'stdout', only the str type.
let mut main = Command::main_binary().unwrap();
main.arg("tags")
.arg("list")
.arg("--use-csv");
let stdout = String::from("\"Name\",\"#id\"");
// stdout.push_str ....
// stdout.push_str ....
// stdout.push_str ....
main.assert()
.success()
.stdout(stdout.as_str());
On run this, i receive error[E0597]: stdout does not live long enough. I cant use .stdout(stdout.as_str());, because i receive the trait assert_cmd::assert::IntoOutputPredicate<_> is not implemented for std::string::String.
Where am I going wrong :( ?
Thank you in advance for your attention.
Hi, maybe is a my mistake, but i cant use the String type with 'stdout', only the str type.
On run this, i receive
error[E0597]: stdout does not live long enough. I cant use.stdout(stdout.as_str());, because i receivethe trait assert_cmd::assert::IntoOutputPredicate<_> is not implemented for std::string::String.Where am I going wrong :( ?
Thank you in advance for your attention.