Skip to content

Conversation

@AaronAjose
Copy link
Contributor

Removes three unused variables (members_struct_code, members_struct_code_mut, members_init_code) that were created, populated, and passed to RewriteNode::interpolate_patched but never referenced in the template string (lines 80-116).

The template only uses $storage_base_code$, $storage_struct_members$, $substorage_members_struct_code$, and $substorage_members_init_code$ — the three removed variables had no corresponding placeholders.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orizi made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @AaronAjose).


crates/cairo-lang-starknet/src/plugin/storage.rs line 54 at r1 (raw file):

        }
        let SimpleMemberGeneratedCode { storage_member, .. } =
            get_simple_member_code(db, &member, config, metadata);

SimpleMemberGeneratedCode seems like a useless struct now - change the code accordingly.

Code quote:

        let SimpleMemberGeneratedCode { storage_member, .. } =
            get_simple_member_code(db, &member, config, metadata);

@AaronAjose
Copy link
Contributor Author

@orizi made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @AaronAjose).

crates/cairo-lang-starknet/src/plugin/storage.rs line 54 at r1 (raw file):

        }
        let SimpleMemberGeneratedCode { storage_member, .. } =
            get_simple_member_code(db, &member, config, metadata);

SimpleMemberGeneratedCode seems like a useless struct now - change the code accordingly.

Code quote:

        let SimpleMemberGeneratedCode { storage_member, .. } =
            get_simple_member_code(db, &member, config, metadata);

Hi @orizi
Done. Removed the SimpleMemberGeneratedCode struct and refactored get_simple_member_code to directly return RewriteNode<'db>

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orizi reviewed 1 file and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AaronAjose).


crates/cairo-lang-starknet/src/plugin/storage.rs line 199 at r2 (raw file):

    db: &'db dyn Database,
    member: &ast::Member<'db>,
    _config: &StorageMemberConfig,

remove as well.

@AaronAjose
Copy link
Contributor Author

@orizi reviewed 1 file and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AaronAjose).

crates/cairo-lang-starknet/src/plugin/storage.rs line 199 at r2 (raw file):

    db: &'db dyn Database,
    member: &ast::Member<'db>,
    _config: &StorageMemberConfig,

remove as well.

Done. Removed the unused _config parameter.

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orizi reviewed 1 file and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AaronAjose).


a discussion (no related file):
@TomerStarkware for 2nd eye.

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orizi made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AaronAjose).


a discussion (no related file):
as you can see - ./scripts/clippy.sh and ./scripts/rust_fmt.sh fails.
please make sure to checkout and run both.

Copy link
Collaborator

@TomerStarkware TomerStarkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@TomerStarkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AaronAjose).

@AaronAjose
Copy link
Contributor Author

Fixed CI issues (removed unused imports: QueryAttrs, StorageMemberConfig, FLAT_ATTR)

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@orizi reviewed 1 file and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AaronAjose).

@orizi orizi enabled auto-merge January 4, 2026 12:39
@orizi orizi added this pull request to the merge queue Jan 4, 2026
Merged via the queue into starkware-libs:main with commit 96ad982 Jan 4, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants