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

Simplify print_room_state #120

Merged
merged 4 commits into from
Oct 21, 2024
Merged

Simplify print_room_state #120

merged 4 commits into from
Oct 21, 2024

Conversation

jknedlik
Copy link
Contributor

@jknedlik jknedlik commented Oct 6, 2024

I have tried to make it more readable, but sadly wasn't able to reduce copy/paste code with rusts generics.

@jknedlik jknedlik changed the title Simplify print_room_state Simplify print_room_state(rdy) Oct 6, 2024
@jknedlik jknedlik changed the title Simplify print_room_state(rdy) Simplify print_room_state Oct 6, 2024
@DimitriiTrater
Copy link

You can create an enum RoomEvents and make an impl Display and Serialized trait for it, this can help hide some complex logic
or you can write macros

@8go 8go merged commit 0775370 into 8go:main Oct 21, 2024
@8go
Copy link
Owner

8go commented Oct 21, 2024

Thank you @jknedlik . Your PR is appreciated ❤️

This is definitely an improvement, better than my code, no doubt. Thank you. 👏

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.

3 participants