xso: re-implement #[xml(lang)] on top of #[xml(attribute)]
This gives us all the goodies of `default`, `type_` and `codec` without having to duplicate lots of code (and I think the `match`-iness of the new macro code is still within limits). However, we still keep them as separate `#[xml(..)]` attributes, because their semantics are very different and it is sensible to make them stand out. skip-changelog, because `#[xml(lang)]` was introduced in this version.
This commit is contained in:
parent
341d49fecf
commit
67f3ffaced
6 changed files with 198 additions and 138 deletions
|
|
@ -2467,7 +2467,7 @@ struct Language {
|
|||
#[xml(child(default))]
|
||||
child: core::option::Option<Box<Language>>,
|
||||
|
||||
#[xml(lang)]
|
||||
#[xml(lang(default))]
|
||||
lang: core::option::Option<String>,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue