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

Refactor the content.rs file #114

Open
Orange-Murker opened this issue Sep 21, 2023 · 2 comments
Open

Refactor the content.rs file #114

Orange-Murker opened this issue Sep 21, 2023 · 2 comments

Comments

@Orange-Murker
Copy link
Contributor

I have noticed that the frame/content.rs file is getting pretty long and it is not always clear before or after which line to add new features to maintain the readability of this file.

For this I have a proposal to make separate submodules under the content module for each frame type. Then we can have all the structs and trait implementations clearly separated from the Content enum.
This would make sure that there is a consistent way to add new frame types in the future.

What do you think?

@polyfloyd
Copy link
Owner

Hi! Yeah, that file is getting out of hand...

Are you suggesting to keep the frame Content struct definitions in the same file as the respective encoder/decoder? If yes, I am not sure how I feel about mixing those functions in the project structure.

But seeing src/frame/content.rs also surpassing the 1000 line-mark, this might be a good idea :)

Would you be interested in proposing a patch to implement this?

@Orange-Murker
Copy link
Contributor Author

Yeah. I can work on implementing it.

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

No branches or pull requests

2 participants