api types: clippy lints

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-06-02 15:57:07 +02:00
parent 11ca834317
commit 1ec167ee8c
2 changed files with 2 additions and 2 deletions

View File

@ -944,7 +944,7 @@ impl BackupDir {
where
T: Into<String>,
{
let time = proxmox_time::parse_rfc3339(&backup_time_string)?;
let time = proxmox_time::parse_rfc3339(backup_time_string)?;
let group = BackupGroup::new(ty, id.into());
Ok(Self { group, time })
}

View File

@ -390,7 +390,7 @@ impl std::str::FromStr for GroupFilter {
type Err = anyhow::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s.split_once(":") {
match s.split_once(':') {
Some(("group", value)) => BACKUP_GROUP_SCHEMA.parse_simple_value(value).map(|_| GroupFilter::Group(value.to_string())),
Some(("type", value)) => Ok(GroupFilter::BackupType(value.parse()?)),
Some(("regex", value)) => Ok(GroupFilter::Regex(Regex::new(value)?)),