Cleanup more issues noted by 'clippy'

Mostly stuff that was introduced by commit 3600b33f1c.
This commit is contained in:
Heikki Linnakangas
2021-04-22 09:20:05 +03:00
parent 9b71ae7dce
commit a4fd1e1a80
10 changed files with 39 additions and 43 deletions

View File

@@ -189,11 +189,11 @@ impl PostgresNode {
);
let port: u16 = CONF_PORT_RE
.captures(config.as_str())
.ok_or(anyhow::Error::msg(err_msg.clone() + " 1"))?
.ok_or_else(|| anyhow::Error::msg(err_msg.clone() + " 1"))?
.iter()
.last()
.ok_or(anyhow::Error::msg(err_msg.clone() + " 2"))?
.ok_or(anyhow::Error::msg(err_msg.clone() + " 3"))?
.ok_or_else(|| anyhow::Error::msg(err_msg.clone() + " 2"))?
.ok_or_else(|| anyhow::Error::msg(err_msg.clone() + " 3"))?
.as_str()
.parse()
.with_context(|| err_msg)?;