xso: fix no_std support
This reverts the Revert in 6ec275d3 which had to be done in order to
un-break usage of xso in std crates.
This commit is contained in:
parent
bf12accd48
commit
beae4ae66b
9 changed files with 42 additions and 9 deletions
|
|
@ -128,7 +128,7 @@ impl Field for AttributeField {
|
|||
generator: quote! {
|
||||
#generator.map(|#bound_name| ::xso::Item::Attribute(
|
||||
#xml_namespace,
|
||||
::std::borrow::Cow::Borrowed(#xml_name),
|
||||
::xso::exports::alloc::borrow::Cow::Borrowed(#xml_name),
|
||||
#bound_name,
|
||||
));
|
||||
},
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ impl ExtractDef {
|
|||
quote! {
|
||||
let name = (
|
||||
::xso::exports::rxml::Namespace::from(#xml_namespace),
|
||||
::std::borrow::Cow::Borrowed(#xml_name),
|
||||
::xso::exports::alloc::borrow::Cow::Borrowed(#xml_name),
|
||||
);
|
||||
#init
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ impl Field for FlagField {
|
|||
2 => ::core::result::Result::Ok(::core::option::Option::Some(
|
||||
::xso::Item::ElementHeadStart(
|
||||
::xso::exports::rxml::Namespace::from(#xml_namespace),
|
||||
::std::borrow::Cow::Borrowed(#xml_name),
|
||||
::xso::exports::alloc::borrow::Cow::Borrowed(#xml_name),
|
||||
)
|
||||
)),
|
||||
_ => unreachable!(),
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ impl Field for TextField {
|
|||
|
||||
Ok(FieldBuilderPart::Text {
|
||||
value: FieldTempInit {
|
||||
init: quote! { ::std::string::String::new() },
|
||||
init: quote! { ::xso::exports::alloc::string::String::new() },
|
||||
ty: string_ty(Span::call_site()),
|
||||
},
|
||||
collect: quote! {
|
||||
|
|
|
|||
Loading…
Reference in a new issue