TadoTheRustacean@programming.dev to Programmer Humor@programming.devEnglish · 1 year agothisIsGoingToBeASeriousDebateprogramming.devimagemessage-square14fedilinkarrow-up121arrow-down11
arrow-up120arrow-down1imagethisIsGoingToBeASeriousDebateprogramming.devTadoTheRustacean@programming.dev to Programmer Humor@programming.devEnglish · 1 year agomessage-square14fedilink
minus-squarepranaless@beehaw.orglinkfedilinkarrow-up0·1 year agouse std::process::Command; fn main() { Command::new("sh") .arg("-c") .arg("echo Hello World!") .spawn() .unwrap(); } Like this?
minus-square30p87@feddit.delinkfedilinkarrow-up0·1 year agoNo, more like use std::process::Command; fn main() { Command::new("sh").arg("-c").arg("echo Hello World!").spawn().unwrap(); } . Just a little bit shorter, as it seems /s
Personally,
echo Hello World!
use std::process::Command; fn main() { Command::new("sh") .arg("-c") .arg("echo Hello World!") .spawn() .unwrap(); }
Like this?
No, more like
use std::process::Command; fn main() { Command::new("sh").arg("-c").arg("echo Hello World!").spawn().unwrap(); }
.
Just a little bit shorter, as it seems /s