xso-proc: Replace std stuff with alloc/core stuff

This commit is contained in:
xmppftw xmppftw 2024-12-19 19:56:17 +01:00 committed by Emmanuel Gil Peyrot
commit 4e5f0bc961
8 changed files with 12 additions and 8 deletions

View file

@ -102,7 +102,7 @@ impl Field for AttributeField {
generator: quote! {
#as_optional_xml_text(#bound_name)?.map(|#bound_name| ::xso::Item::Attribute(
#xml_namespace,
::std::borrow::Cow::Borrowed(#xml_name),
::alloc::borrow::Cow::Borrowed(#xml_name),
#bound_name,
));
},

View file

@ -423,7 +423,7 @@ impl ExtractDef {
quote! {
let name = (
::xso::exports::rxml::Namespace::from(#xml_namespace),
::std::borrow::Cow::Borrowed(#xml_name),
::alloc::borrow::Cow::Borrowed(#xml_name),
);
#init
}

View file

@ -51,7 +51,7 @@ impl Field for TextField {
Ok(FieldBuilderPart::Text {
value: FieldTempInit {
init: quote! { ::std::string::String::new() },
init: quote! { ::alloc::string::String::new() },
ty: string_ty(Span::call_site()),
},
collect: quote! {