Skip to content

Commit 84f61d1

Browse files
committed
More comments
1 parent c8681f5 commit 84f61d1

File tree

1 file changed

+5
-0
lines changed
  • execution-plan-macros/src

1 file changed

+5
-0
lines changed

execution-plan-macros/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ fn impl_value_on_struct(
3939
};
4040
};
4141

42+
// We're going to construct some fragments of Rust source code, which will get used in the
43+
// final generated code this function returns.
44+
4245
// For every field in the struct, this macro will:
4346
// - In the `into_parts`, extend the Vec of parts with that field, turned into parts.
4447
// - In the `from_parts`, instantiate a Self with a field from that part.
@@ -68,6 +71,8 @@ fn impl_value_on_struct(
6871
}
6972
let where_clause = generics.where_clause;
7073

74+
// Final return value: the generated Rust code to implement the trait.
75+
// This uses the fragments above, interpolating them into the final outputted code.
7176
quote! {
7277
impl #generics_without_defaults kittycad_execution_plan_traits::Value for #name #generics_without_defaults
7378
#where_clause

0 commit comments

Comments
 (0)