Skip to content

Add ability to set custom prefix for getters#129

Open
thesw4rm wants to merge 5 commits intojbaublitz:mainfrom
thesw4rm:128_custom_prefix
Open

Add ability to set custom prefix for getters#129
thesw4rm wants to merge 5 commits intojbaublitz:mainfrom
thesw4rm:128_custom_prefix

Conversation

@thesw4rm
Copy link
Copy Markdown

#128

Support for custom prefixes on getters will be very helpful for various use cases, including mocks for testing.

Copy link
Copy Markdown
Owner

@jbaublitz jbaublitz left a comment

Choose a reason for hiding this comment

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

I'm going though the code now but for the time being, would you be able to add a test case using the global prefix option as well?

@thesw4rm
Copy link
Copy Markdown
Author

thesw4rm commented Nov 14, 2025 via email

@thesw4rm
Copy link
Copy Markdown
Author

I'm going though the code now but for the time being, would you be able to add a test case using the global prefix option as well?

Added the test

@jbaublitz
Copy link
Copy Markdown
Owner

Okay, I'll try to continue review this weekend.

Copy link
Copy Markdown
Owner

@jbaublitz jbaublitz left a comment

Choose a reason for hiding this comment

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

Just one minor comment and then I'll merge this.

Comment thread src/generate.rs
syn::punctuated::Punctuated::<syn::Meta, syn::Token![,]>::parse_terminated,
) {
meta_list.into_iter().find_map(|meta| {
if meta.path().is_ident("prefix") {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think this if statement is redundant.

@jbaublitz
Copy link
Copy Markdown
Owner

It also looks like there's a CI failure.

@thesw4rm
Copy link
Copy Markdown
Author

thesw4rm commented Dec 5, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants