Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use macros to reduce code deduplication #358

Closed
wants to merge 1 commit into from
Closed

Use macros to reduce code deduplication #358

wants to merge 1 commit into from

Conversation

notgull
Copy link
Contributor

@notgull notgull commented Oct 10, 2022

In #291, I added Arc-oriented Mutex locks; however, when writing the locking functions for this code, there is a lot of code that ends up being duplicated. This PR adds a macro that reduces the amount of code written (and may make it easier to add more Arc-oriented methods in the future.

I'm not particularly attached to any kind of macro syntax.

@Amanieu
Copy link
Owner

Amanieu commented Oct 11, 2022

I'm not a big fan of this change. I think it makes maintenance harder because the code is now much less readable and it isn't formatted by rustfmt.

@notgull
Copy link
Contributor Author

notgull commented Oct 11, 2022

Fair enough.

@notgull notgull closed this Oct 11, 2022
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.

None yet

2 participants