Allow Multiple dependencies for states in the RealDom (native core) (#412)
* WIP multable deps * WIP: refactor and genralize state macro * add traversable trait * update tui to use elementid to index dom
This commit is contained in:
1 parent
c271fc132e
commit
4a5ae758ee
19 files changed
+990
-1103
No files matched your search
@@ -83,7 +83,7 @@ mod util {
|
||||
}
|
||||
|
||||
pub fn expr_to_single_string(expr: &syn::Expr) -> Option<String> {
|
||||
if let syn::Expr::Path(path) = &*expr {
|
||||
if let syn::Expr::Path(path) = expr {
|
||||
path_to_single_string(&path.path)
|
||||
} else {
|
||||
None
|
||||
@@ -779,13 +779,12 @@ Finally, call `.build()` to create the instance of `{name}`.
|
||||
// NOTE: both auto_into and strip_option affect `arg_type` and `arg_expr`, but the order of
|
||||
// nesting is different so we have to do this little dance.
|
||||
let arg_type = if field.builder_attr.strip_option {
|
||||
let internal_type = field.type_from_inside_option(false).ok_or_else(|| {
|
||||
field.type_from_inside_option(false).ok_or_else(|| {
|
||||
Error::new_spanned(
|
||||
&field_type,
|
||||
"can't `strip_option` - field is not `Option<...>`",
|
||||
)
|
||||
})?;
|
||||
internal_type
|
||||
})?
|
||||
} else {
|
||||
field_type
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user