fix new clippy warnings

This commit is contained in:
Dustin J. Mitchell 2021-09-05 21:55:09 +00:00
parent fd2add5dea
commit 72b4941485
5 changed files with 9 additions and 9 deletions

View file

@ -125,7 +125,7 @@ fn get_server(settings: &Settings) -> anyhow::Result<Box<dyn Server>> {
settings.server_origin.as_ref(),
settings.encryption_secret.as_ref(),
) {
let client_key = Uuid::parse_str(&client_key)?;
let client_key = Uuid::parse_str(client_key)?;
log::debug!("Using sync-server with origin {}", origin);
log::debug!("Sync client ID: {}", client_key);

View file

@ -30,11 +30,11 @@ pub(super) fn apply_modification(
}
for tag in modification.add_tags.iter() {
task.add_tag(&tag)?;
task.add_tag(tag)?;
}
for tag in modification.remove_tags.iter() {
task.remove_tag(&tag)?;
task.remove_tag(tag)?;
}
if let Some(wait) = modification.wait {

View file

@ -130,7 +130,7 @@ impl TryFrom<&toml::Value> for Report {
.map(|(i, v)| {
v.as_str()
.ok_or_else(|| anyhow!(".filter[{}]: not a string", i))
.and_then(|s| Condition::parse_str(&s))
.and_then(|s| Condition::parse_str(s))
.map_err(|e| anyhow!(".filter[{}]: {}", i, e))
})
.collect::<Result<Vec<_>>>()?,

View file

@ -97,7 +97,7 @@ impl Settings {
"server_dir",
"reports",
];
let table = table_with_keys(&config_toml, &table_keys)?;
let table = table_with_keys(config_toml, &table_keys)?;
fn get_str_cfg<F: FnOnce(String)>(
table: &Table,