Skip to content

Commit 01a4e98

Browse files
committed
Take new clippy suggestions that came with 1.38
1 parent a57fed2 commit 01a4e98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tasks/dump_db.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl DumpDirectory {
8787
.spawn()?
8888
.wait()?;
8989
if !status.success() {
90-
Err("pg_dump did not finish successfully.")?;
90+
return Err("pg_dump did not finish successfully.".into());
9191
}
9292
Ok(())
9393
}
@@ -119,10 +119,10 @@ pub fn run_psql(script: &Path, database_url: &str) -> Result<(), PerformError> {
119119
let output = psql.wait_with_output()?;
120120
let stderr = String::from_utf8_lossy(&output.stderr);
121121
if stderr.contains("ERROR") {
122-
Err(format!("Error while executing psql: {}", stderr))?;
122+
return Err(format!("Error while executing psql: {}", stderr).into());
123123
}
124124
if !output.status.success() {
125-
Err("psql did not finish successfully.")?;
125+
return Err("psql did not finish successfully.".into());
126126
}
127127
Ok(())
128128
}

0 commit comments

Comments
 (0)