Add no_std support via disabling the new default feature std (#319)

This commit is contained in:
Graham Esau 2024-08-17 19:46:11 +01:00 committed by GitHub
parent 3c9e49d161
commit 89a34e7a63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 343 additions and 164 deletions

View file

@ -155,7 +155,7 @@ impl ValidationAttrs {
if !ignore_errors {
errors.error_spanned_by(
meta,
"unknown item in schemars length attribute".to_string(),
"unknown item in schemars length attribute",
);
}
}
@ -184,7 +184,7 @@ impl ValidationAttrs {
if !ignore_errors {
errors.error_spanned_by(
meta,
"unknown item in schemars range attribute".to_string(),
"unknown item in schemars range attribute",
);
}
}
@ -252,8 +252,7 @@ impl ValidationAttrs {
if !ignore_errors {
errors.error_spanned_by(
meta,
"unknown item in schemars regex attribute"
.to_string(),
"unknown item in schemars regex attribute",
);
}
}
@ -294,8 +293,7 @@ impl ValidationAttrs {
if !ignore_errors {
errors.error_spanned_by(
meta,
"unknown item in schemars contains attribute"
.to_string(),
"unknown item in schemars contains attribute",
);
}
}
@ -390,7 +388,7 @@ impl ValidationAttrs {
if let Some(format) = &self.format {
let f = format.schema_str();
result.push(quote! {
schema.ensure_object().insert("format".to_owned(), #f.into());
schema.ensure_object().insert("format".into(), #f.into());
})
};