macro: don't enforce the AsOptionStr type on formats
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
fab0210287
commit
a6fcaf27e5
@ -638,9 +638,7 @@ fn named_struct_impl_verify(span: Span, fields: &[StructField]) -> Result<TokenS
|
||||
|
||||
if let Some(ref value) = field.def.format {
|
||||
body.extend(quote_spanned! { value.span() =>
|
||||
if !#value::verify(::proxmox::api::meta::AsOptionStr::as_option_str(
|
||||
&self.#field_ident,
|
||||
)) {
|
||||
if !#value::verify(&self.#field_ident) {
|
||||
error_string.push_str(
|
||||
&format!("field {} does not match format {}", #field_str, #value::NAME)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user