Revert "improved documentation and refactored naming to be more self-explanatory"
This reverts commit adfbb6c380.
This commit is contained in:
1 parent
adfbb6c380
commit
906c466e78
91 files changed
+1553
-1663
No files matched your search
@@ -66,13 +66,12 @@ pub fn partial_derive_state(_: TokenStream, input: TokenStream) -> TokenStream {
|
||||
Some(tuple) => {
|
||||
let mut parent_dependencies = Vec::new();
|
||||
for type_ in &tuple.elems {
|
||||
let mut type_ =
|
||||
extract_type_path(type_).unwrap_or_else(|| {
|
||||
panic!(
|
||||
"ParentDependencies must be a tuple of type paths, found {}",
|
||||
quote!(#type_)
|
||||
)
|
||||
});
|
||||
let mut type_ = extract_type_path(type_).unwrap_or_else(|| {
|
||||
panic!(
|
||||
"ParentDependencies must be a tuple of type paths, found {}",
|
||||
quote!(#type_)
|
||||
)
|
||||
});
|
||||
if type_ == self_path {
|
||||
type_ = this_type.clone();
|
||||
}
|
||||
@@ -81,24 +80,21 @@ pub fn partial_derive_state(_: TokenStream, input: TokenStream) -> TokenStream {
|
||||
}
|
||||
parent_dependencies
|
||||
}
|
||||
_ => {
|
||||
panic!(
|
||||
"ParentDependencies must be a tuple, found {}",
|
||||
quote!(#parent_dependencies)
|
||||
)
|
||||
}
|
||||
_ => panic!(
|
||||
"ParentDependencies must be a tuple, found {}",
|
||||
quote!(#parent_dependencies)
|
||||
),
|
||||
};
|
||||
let child_dependencies = match extract_tuple(child_dependencies) {
|
||||
Some(tuple) => {
|
||||
let mut child_dependencies = Vec::new();
|
||||
for type_ in &tuple.elems {
|
||||
let mut type_ =
|
||||
extract_type_path(type_).unwrap_or_else(|| {
|
||||
panic!(
|
||||
"ChildDependencies must be a tuple of type paths, found {}",
|
||||
quote!(#type_)
|
||||
)
|
||||
});
|
||||
let mut type_ = extract_type_path(type_).unwrap_or_else(|| {
|
||||
panic!(
|
||||
"ChildDependencies must be a tuple of type paths, found {}",
|
||||
quote!(#type_)
|
||||
)
|
||||
});
|
||||
if type_ == self_path {
|
||||
type_ = this_type.clone();
|
||||
}
|
||||
@@ -107,39 +103,34 @@ pub fn partial_derive_state(_: TokenStream, input: TokenStream) -> TokenStream {
|
||||
}
|
||||
child_dependencies
|
||||
}
|
||||
_ => {
|
||||
panic!(
|
||||
"ChildDependencies must be a tuple, found {}",
|
||||
quote!(#child_dependencies)
|
||||
)
|
||||
}
|
||||
_ => panic!(
|
||||
"ChildDependencies must be a tuple, found {}",
|
||||
quote!(#child_dependencies)
|
||||
),
|
||||
};
|
||||
let node_dependencies =
|
||||
match extract_tuple(node_dependencies) {
|
||||
Some(tuple) => {
|
||||
let mut node_dependencies = Vec::new();
|
||||
for type_ in &tuple.elems {
|
||||
let mut type_ = extract_type_path(type_).unwrap_or_else(|| {
|
||||
panic!(
|
||||
"NodeDependencies must be a tuple of type paths, found {}",
|
||||
quote!(#type_)
|
||||
)
|
||||
});
|
||||
if type_ == self_path {
|
||||
type_ = this_type.clone();
|
||||
}
|
||||
combined_dependencies.insert(type_.clone());
|
||||
node_dependencies.push(type_);
|
||||
let node_dependencies = match extract_tuple(node_dependencies) {
|
||||
Some(tuple) => {
|
||||
let mut node_dependencies = Vec::new();
|
||||
for type_ in &tuple.elems {
|
||||
let mut type_ = extract_type_path(type_).unwrap_or_else(|| {
|
||||
panic!(
|
||||
"NodeDependencies must be a tuple of type paths, found {}",
|
||||
quote!(#type_)
|
||||
)
|
||||
});
|
||||
if type_ == self_path {
|
||||
type_ = this_type.clone();
|
||||
}
|
||||
node_dependencies
|
||||
combined_dependencies.insert(type_.clone());
|
||||
node_dependencies.push(type_);
|
||||
}
|
||||
_ => {
|
||||
panic!(
|
||||
"NodeDependencies must be a tuple, found {}",
|
||||
quote!(#node_dependencies)
|
||||
)
|
||||
}
|
||||
};
|
||||
node_dependencies
|
||||
}
|
||||
_ => panic!(
|
||||
"NodeDependencies must be a tuple, found {}",
|
||||
quote!(#node_dependencies)
|
||||
),
|
||||
};
|
||||
combined_dependencies.insert(this_type.clone());
|
||||
|
||||
let combined_dependencies: Vec<_> = combined_dependencies.into_iter().collect();
|
||||
|
||||
Reference in new issue
Block a user