Skip to content

Commit c8f30cd

Browse files
committed
chore(stackable-versioned): Add doc comments
1 parent f5d0ce9 commit c8f30cd

File tree

1 file changed

+10
-2
lines changed
  • crates/stackable-versioned-macros/src/codegen/item

1 file changed

+10
-2
lines changed

crates/stackable-versioned-macros/src/codegen/item/field.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ impl VersionedField {
190190
// The user specified a custom conversion function which
191191
// will be used here instead of the default .into() call
192192
// which utilizes From impls.
193+
// FIXME (@Techassi): A custom conversion function needs
194+
// to integrate with tracking as well.
193195
Some(upgrade_fn) => Some(quote! {
194196
#to_ident: #upgrade_fn(#from_struct_ident.#from_ident),
195197
}),
@@ -361,8 +363,8 @@ impl VersionedField {
361363
(None, false) => None,
362364

363365
// If the field is marked as nested, a path variable for that field needs to be generated
364-
// which is then passed down to the sub struct. There is however no need to look determine
365-
// if the field itself also has changes. This is explicitly handled by the following match
366+
// which is then passed down to the sub struct. There is however no need to determine if
367+
// the field itself also has changes. This is explicitly handled by the following match
366368
// arm.
367369
(_, true) => {
368370
let field_ident = &self.idents.json_path;
@@ -391,10 +393,16 @@ impl VersionedField {
391393
}
392394
}
393395

396+
/// A collection of field idents used for different purposes.
394397
#[derive(Debug)]
395398
pub struct FieldIdents {
399+
/// The original ident.
396400
pub original: IdentString,
401+
402+
/// The cleaned ident, with the deprecation prefix removed.
397403
pub cleaned: IdentString,
404+
405+
/// The cleaned ident used for JSONPath variables.
398406
pub json_path: IdentString,
399407
}
400408

0 commit comments

Comments
 (0)