Fix clippy error: avoid using collect() when not needed
This fixes a clippy error introduced in 1.54 rust
For more information see
@@ -45,9 +45,8 @@ impl AdminPermission for SettingsAdminPermission {
for entry in setting.get_entries() {
if entry.key == ADMINISTRATORS_SETTING_KEY {
- let values = entry.value.split(',');
- let value_vec: Vec<&str> = values.collect();
- return Ok(value_vec.contains(&signer));
+ let mut values = entry.value.split(',');
+ return Ok(values.any(|x| x == signer));
}
}
