Skip to content

Commit 4e34662

Browse files
committed
chore: Replace unwrap with expect
1 parent e2eed77 commit 4e34662

File tree

1 file changed

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

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ pub(crate) struct VersionedField {
2424

2525
impl VersionedField {
2626
pub(crate) fn new(field: Field, versions: &[VersionDefinition]) -> Result<Self> {
27-
// TODO (@Techassi): Remove unwrap
2827
let field_attributes = FieldAttributes::from_field(&field)?;
2928
field_attributes.validate_versions(versions)?;
3029

31-
let field_ident = FieldIdent::from(field.ident.unwrap());
30+
let field_ident = FieldIdent::from(
31+
field
32+
.ident
33+
.expect("internal error: field must have an ident"),
34+
);
3235
let changes = field_attributes
3336
.common
3437
.into_changeset(&field_ident, field.ty.clone());

0 commit comments

Comments
 (0)