xso: move helper iterators and builders into separate module
This declutters the main `xso` namespace. In addition, if (when) we introduce more complex generic implementations, we might want to have tests for these, and those can then live there, too, without making the main `lib.rs` file gigantic (or moving the tests too far away from the tested code).
This commit is contained in:
parent
9f4af1625d
commit
f1ab857c6e
5 changed files with 136 additions and 97 deletions
|
|
@ -389,7 +389,7 @@ impl ExtractDef {
|
|||
// corresponding to this code above, and we will not repeat it
|
||||
// here.
|
||||
quote! {
|
||||
::xso::OptionAsXml::new(::core::option::Option::from(#bound_name).map(|#bound_name| {
|
||||
::xso::asxml::OptionAsXml::new(::core::option::Option::from(#bound_name).map(|#bound_name| {
|
||||
#item_iter_ty_ident::new((#bound_name,))
|
||||
}).transpose()?)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -768,6 +768,10 @@ pub(crate) fn option_as_xml_ty(inner_ty: Type) -> Type {
|
|||
ident: Ident::new("xso", span),
|
||||
arguments: PathArguments::None,
|
||||
},
|
||||
PathSegment {
|
||||
ident: Ident::new("asxml", span),
|
||||
arguments: PathArguments::None,
|
||||
},
|
||||
PathSegment {
|
||||
ident: Ident::new("OptionAsXml", span),
|
||||
arguments: PathArguments::AngleBracketed(AngleBracketedGenericArguments {
|
||||
|
|
|
|||
Loading…
Reference in a new issue