diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-09-30 15:05:46 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-10-06 12:21:20 +0200 |
commit | 989ca3dba8e92b3c34ab862d528f518e7835515e (patch) | |
tree | 0bc1e7a15b21844163d537ac1b2f870c67ad664f /lib/etc | |
parent | e34d67d0a11d752832ecbf2a0e002b43419b68e3 (diff) |
Update dependencies: regex: 0.2 -> 1, tempfile: 2 -> 3
Diffstat (limited to 'lib/etc')
-rw-r--r-- | lib/etc/libimagutil/Cargo.toml | 4 | ||||
-rw-r--r-- | lib/etc/libimagutil/src/edit.rs | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/etc/libimagutil/Cargo.toml b/lib/etc/libimagutil/Cargo.toml index fa4f7574..17e979fa 100644 --- a/lib/etc/libimagutil/Cargo.toml +++ b/lib/etc/libimagutil/Cargo.toml @@ -30,7 +30,7 @@ url = "1.5" boolinator = "2.4.0" lazy_static = "1" log = "0.4.0" -regex = "0.2" -tempfile = "2.1" +regex = "1" +tempfile = "3" chrono = "0.4" diff --git a/lib/etc/libimagutil/src/edit.rs b/lib/etc/libimagutil/src/edit.rs index 17ad347c..4a91c798 100644 --- a/lib/etc/libimagutil/src/edit.rs +++ b/lib/etc/libimagutil/src/edit.rs @@ -31,7 +31,7 @@ pub fn edit_in_tmpfile_with_command(mut cmd: Command, s: &mut String) -> Result< let file_path = file.path(); file.write_all(&s.clone().into_bytes()[..])?; - file.sync_data()?; + file.as_file().sync_data()?; debug!("Calling {:?} for {}", cmd, file_path.display()); @@ -39,7 +39,8 @@ pub fn edit_in_tmpfile_with_command(mut cmd: Command, s: &mut String) -> Result< .status() .and_then(|status| { if status.success() { - file.sync_data() + file.as_file() + .sync_data() .and_then(|_| file.seek(SeekFrom::Start(0))) .and_then(|_| { let mut new_s = String::new(); |