From 80f950c05dc11b85f95d87d3528876f72eec3006 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 24 Aug 2021 16:12:58 +0200 Subject: [PATCH] more Updatable -> UpdaterType fixups Signed-off-by: Wolfgang Bumiller --- pbs-api-types/src/userid.rs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/pbs-api-types/src/userid.rs b/pbs-api-types/src/userid.rs index 5ecae4df..1794c720 100644 --- a/pbs-api-types/src/userid.rs +++ b/pbs-api-types/src/userid.rs @@ -30,7 +30,7 @@ use lazy_static::lazy_static; use serde::{Deserialize, Serialize}; use proxmox::api::api; -use proxmox::api::schema::{ApiStringFormat, ApiType, Schema, StringSchema, Updatable}; +use proxmox::api::schema::{ApiStringFormat, ApiType, Schema, StringSchema, UpdaterType}; use proxmox::const_regex; // we only allow a limited set of characters @@ -397,18 +397,12 @@ impl<'a> TryFrom<&'a str> for &'a TokennameRef { } /// A complete user id consisting of a user name and a realm -#[derive(Clone, Debug, PartialEq, Eq, Hash)] +#[derive(Clone, Debug, PartialEq, Eq, Hash, UpdaterType)] pub struct Userid { data: String, name_len: usize, } -impl Updatable for Userid { - type Updater = Option; - - const UPDATER_IS_OPTION: bool = true; -} - impl ApiType for Userid { const API_SCHEMA: Schema = StringSchema::new("User ID") .format(&PROXMOX_USER_ID_FORMAT) @@ -534,19 +528,12 @@ impl PartialEq for Userid { } /// A complete authentication id consisting of a user id and an optional token name. -#[derive(Clone, Debug, Eq, PartialEq, Hash)] +#[derive(Clone, Debug, Eq, PartialEq, Hash, UpdaterType)] pub struct Authid { user: Userid, tokenname: Option } - -impl Updatable for Authid { - type Updater = Option; - - const UPDATER_IS_OPTION: bool = true; -} - impl ApiType for Authid { const API_SCHEMA: Schema = StringSchema::new("Authentication ID") .format(&PROXMOX_AUTH_ID_FORMAT)