Update dependencies: regex: 0.2 -> 1, tempfile: 2 -> 3

This commit is contained in:
Matthias Beyer 2018-09-30 15:05:46 +02:00
parent e34d67d0a1
commit 989ca3dba8
2 changed files with 5 additions and 4 deletions

View file

@ -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"

View file

@ -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();