Closed Christopher22 closed 3 years ago
Thanks for your contribution! :)
Could you please split your commit in two commits?
That subdivision would help me reviewing your changes
It seems there are two clippy
lints that fail the CI, could you fix them?
Hey Luni-4, you are welcome!
Originally, I planed to do exactly those two commits. However, there are quite entangled: Initially, the usage of create_struct! required providing all the tremendous parameters for set_params!, too. Stating those for the first comment just to remove them afterwards completely does not seem worth the work.
Sure, I will fix the clippy warnings.
Originally, I planed to do exactly those two commits. However, there are quite entangled: Initially, the usage of create_struct! required providing all the tremendous parameters for set_params!, too. Stating those for the first comment just to remove them afterwards completely does not seem worth the work.
Ok, no problem then, I will try to review your PR the same.
Sure, I will fix the clippy warnings.
Great! I'm going to start reviewing as soon as the warnings are fixed
Mmh. What's going on?! These enums have nothing to do with my changes, How did the warnings got into the master branch?
That clippy warnings are suggesting to remove the pub(crate) fn [<to_ $func_name>](&self) -> $type
macro since it isn't used anymore after your changes
I assumed the would recommend removing the "to_audio_dither_method", "to_resample_filter_type", "to_matrix_encoding", and "to_mix_coefficient_type" implemented in terms of this macro. If your willing, I could remove this functions from the crate. But it is not any code I touched, ich just want to check twice.
I assumed the would recommend removing the "to_audio_dither_method", "to_resample_filter_type", "to_matrix_encoding", and "to_mix_coefficient_type" implemented in terms of this macro. If your willing, I could remove this functions from the crate. But it is not any code I touched, ich just want to check twice.
For now we could add #[allow(dead_code)]
for that macro and then verify the problem in another PR, in this way the clippy lint is ignored
As the first important step to refactor the source code as mentioned in #16, this pull request removes the custom getters and setters in favor of Deref and DerefMut. This renders the exposed structures as smart pointers with additional convenience functions for creation and updating. By enforcing a consistent usage of
create_struct!
rather than its separate parts all over the crate and removal of theset_params!
macro, the creation of structs is now unified and simplified.