polyfloyd / rust-id3

A rust library for reading and writing ID3 metadata
MIT License
245 stars 47 forks source link

Refactor the content.rs file #114

Open Orange-Murker opened 1 year ago

Orange-Murker commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Yeah. I can work on implementing it.