Update dependencies: regex: 0.2 -> 1, tempfile: 2 -> 3
This commit is contained in:
parent
e34d67d0a1
commit
989ca3dba8
2 changed files with 5 additions and 4 deletions
|
@ -30,7 +30,7 @@ url = "1.5"
|
||||||
boolinator = "2.4.0"
|
boolinator = "2.4.0"
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
log = "0.4.0"
|
log = "0.4.0"
|
||||||
regex = "0.2"
|
regex = "1"
|
||||||
tempfile = "2.1"
|
tempfile = "3"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ pub fn edit_in_tmpfile_with_command(mut cmd: Command, s: &mut String) -> Result<
|
||||||
let file_path = file.path();
|
let file_path = file.path();
|
||||||
|
|
||||||
file.write_all(&s.clone().into_bytes()[..])?;
|
file.write_all(&s.clone().into_bytes()[..])?;
|
||||||
file.sync_data()?;
|
file.as_file().sync_data()?;
|
||||||
|
|
||||||
debug!("Calling {:?} for {}", cmd, file_path.display());
|
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()
|
.status()
|
||||||
.and_then(|status| {
|
.and_then(|status| {
|
||||||
if status.success() {
|
if status.success() {
|
||||||
file.sync_data()
|
file.as_file()
|
||||||
|
.sync_data()
|
||||||
.and_then(|_| file.seek(SeekFrom::Start(0)))
|
.and_then(|_| file.seek(SeekFrom::Start(0)))
|
||||||
.and_then(|_| {
|
.and_then(|_| {
|
||||||
let mut new_s = String::new();
|
let mut new_s = String::new();
|
||||||
|
|
Loading…
Reference in a new issue