exec
method: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.exec
use std::process::Command;
fn main() {
let file_name = format!("myfile");
let output = Command::new("cat")
.args(&[&file_name[..]]) // you can also pass in more arguments, by filling it in the outer array
.output();
match output {
Ok(_) => {/* do some actions */ },
Err(_err) => { /* do some action */ }
}
}
one mutable ref
to an value can exist per time
ref mut _a
, you are not allowed to create the next mutable borrow ref mut _b
*r
?), because https://play.rust-lang.org/?gist=aa24246218bf0d7d46a873a6315911cc works fine
for f in $(find . -type d -name DWARF) ; do nm $f/* | awk '{print $3}'; done | sort | uniq -c | sort -n | less
$ dust
1.2G .
1.2G └─┬ target
1.2G └─┬ debug
1.1G ├─┬ deps