~samwhited/sinit

26f3f765d70c07f470de169c8f4b069399b03e5f — Sam Whited 2 years ago f631a21
Remove unnecessary muts
2 files changed, 22 insertions(+), 13 deletions(-)

M Cargo.lock
M src/main.rs
M Cargo.lock => Cargo.lock +20 -11
@@ 1,21 1,30 @@
[root]
name = "sinit"
version = "0.1.2"
[[package]]
name = "getopts"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
 "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "getopts"
version = "0.2.14"
name = "libc"
version = "0.2.43"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "libc"
version = "0.2.21"
name = "sinit"
version = "0.1.2"
dependencies = [
 "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "unicode-width"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"

[metadata]
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135"
"checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797"
"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"

M src/main.rs => src/main.rs +2 -2
@@ 78,7 78,7 @@ fn main() {

    // TODO: Cleanup: https://github.com/rust-lang/rust/issues/15023
    let mut command = Command::new(cmd);
    let mut command = command.before_exec(move || {
    let command = command.before_exec(move || {
        if sid {
            unsafe {
                let _ = libc::setsid();


@@ 87,7 87,7 @@ fn main() {
        Ok(())
    });

    let mut command = if matches.free.len() > 1 {
    let command = if matches.free.len() > 1 {
        command.args(&matches.free[1..])
    } else {
        command