notify: adapt to proxmox_schema changes, use const_format

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2024-03-19 10:29:27 +01:00
parent 686453a28c
commit 6f1d439f09
2 changed files with 6 additions and 6 deletions

View File

@ -9,6 +9,7 @@ exclude.workspace = true
[dependencies]
anyhow.workspace = true
const_format.workspace = true
handlebars = { workspace = true }
lazy_static.workspace = true
lettre = { workspace = true, optional = true }

View File

@ -1,15 +1,14 @@
use regex::Regex;
use std::collections::HashSet;
use std::fmt;
use std::fmt::Debug;
use std::str::FromStr;
use const_format::concatcp;
use regex::Regex;
use serde::{Deserialize, Serialize};
use proxmox_schema::api_types::COMMENT_SCHEMA;
use proxmox_schema::{
api, const_regex, ApiStringFormat, Schema, StringSchema, Updater, SAFE_ID_REGEX_STR,
};
use proxmox_schema::api_types::{COMMENT_SCHEMA, SAFE_ID_REGEX_STR};
use proxmox_schema::{api, const_regex, ApiStringFormat, Schema, StringSchema, Updater};
use proxmox_time::{parse_daily_duration, DailyDuration};
use crate::schema::ENTITY_NAME_SCHEMA;
@ -47,7 +46,7 @@ impl MatchModeOperator {
}
const_regex! {
pub MATCH_FIELD_ENTRY_REGEX = concat!(r"^(?:(exact|regex):)?(", SAFE_ID_REGEX_STR!(), r")=(.*)$");
pub MATCH_FIELD_ENTRY_REGEX = concatcp!(r"^(?:(exact|regex):)?(", SAFE_ID_REGEX_STR, r")=(.*)$");
}
pub const MATCH_FIELD_ENTRY_FORMAT: ApiStringFormat =