diff --git a/backup-daemon/Cargo.lock b/backup-daemon/Cargo.lock index c17c315..15f56fd 100644 --- a/backup-daemon/Cargo.lock +++ b/backup-daemon/Cargo.lock @@ -1,54 +1,60 @@ -[root] -name = "wbs-backup-daemon" -version = "1.1.16" -dependencies = [ - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "libc" -version = "0.2.15" +version = "0.2.119" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" [[package]] name = "rustc-serialize" -version = "0.3.19" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" [[package]] name = "time" -version = "0.1.35" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "wasi", + "winapi", +] + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wbs-backup-daemon" +version = "1.1.16" +dependencies = [ + "rustc-serialize", + "time", ] [[package]] name = "winapi" -version = "0.2.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] [[package]] -name = "winapi-build" -version = "0.1.1" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[metadata] -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "23e3757828fa702a20072c37ff47938e9dd331b92fac6e223d26d4b7a55f7ee2" -"checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" -"checksum time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7ec6d62a20df54e07ab3b78b9a3932972f4b7981de295563686849eb3989af" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/backup-daemon/src/wbs/backup/run.rs b/backup-daemon/src/wbs/backup/run.rs index d1c9cc6..0c95dc9 100644 --- a/backup-daemon/src/wbs/backup/run.rs +++ b/backup-daemon/src/wbs/backup/run.rs @@ -78,23 +78,23 @@ pub fn write_process_output ( process_output: & process::Output, ) -> Result<()> { - try! (write! ( + write! ( output_file, - "STDOUT:\n")); + "STDOUT:\n")?; - try! (output_file.write ( - & process_output.stdout)); + output_file.write ( + & process_output.stdout)?; - try! (write! ( + write! ( output_file, - "\nSTDERR:\n")); + "\nSTDERR:\n")?; - try! (output_file.write ( - & process_output.stderr)); + output_file.write ( + & process_output.stderr)?; - try! (write! ( + write! ( output_file, - "\n")); + "\n")?; Ok (()) diff --git a/backup-daemon/src/wbs/backup/state.rs b/backup-daemon/src/wbs/backup/state.rs index 997a298..05899f5 100644 --- a/backup-daemon/src/wbs/backup/state.rs +++ b/backup-daemon/src/wbs/backup/state.rs @@ -433,10 +433,10 @@ impl Global { state_json: &str, ) -> Result<()> { - let mut file = try! { File::create (state_path_temp) }; + let mut file = File::create (state_path_temp)?; - try! { write! (&mut file, "{}\n", & state_json.to_string ()) } - try! { file.sync_all () } + write! (&mut file, "{}\n", & state_json.to_string ())?; + file.sync_all ()?; Ok (())