Skip to content

Commit

Permalink
Take new clippy suggestions that came with 1.38
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Sep 28, 2019
1 parent a57fed2 commit 01a4e98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tasks/dump_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl DumpDirectory {
.spawn()?
.wait()?;
if !status.success() {
Err("pg_dump did not finish successfully.")?;
return Err("pg_dump did not finish successfully.".into());
}
Ok(())
}
Expand Down Expand Up @@ -119,10 +119,10 @@ pub fn run_psql(script: &Path, database_url: &str) -> Result<(), PerformError> {
let output = psql.wait_with_output()?;
let stderr = String::from_utf8_lossy(&output.stderr);
if stderr.contains("ERROR") {
Err(format!("Error while executing psql: {}", stderr))?;
return Err(format!("Error while executing psql: {}", stderr).into());
}
if !output.status.success() {
Err("psql did not finish successfully.")?;
return Err("psql did not finish successfully.".into());
}
Ok(())
}
Expand Down

0 comments on commit 01a4e98

Please sign in to comment.