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 where
T: Into<String>, 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()); let group = BackupGroup::new(ty, id.into());
Ok(Self { group, time }) Ok(Self { group, time })
} }

View File

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