-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: apply several optimizations #2
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
Conversation
…filter presets all
update session_id
|
this is code |
|
yes, this is indeed code! |
|
Seeing these corrections made me realize I'm a terrible programmer lol |
notigorwastaken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your contribution, welcome to the team. 🥰
No, you are not! You are learning, Igor! To be honest, I would even say your Rust code is pretty good! ❤️ |
|
Just be sure to take note of my suggestions as you learn along! 😉 |
Absolutely, thank you very much! |
The following pull request applies the following changes for optimization purposes:
crate::utils::emojis::get_emojiby making the second argument a&strnot aStringand making the function a one-liner.awaitseveral unused async callsformat!()and including removing some redundant onesclone()ing ofOption<T>types by usingas_ref()oras_deref()insteadclone()ing of types that implementCopyunwrap_or_default()whenever necessaryArc<T>sFilterPreset:ALLinstead of a method returns the sameVec<T>every timeequalizer_vec![]macro for every equalizer bands declaration instead of creating aVecand reconstructing it every timeSelf, marking some of them asconst, etc.)FromStrimpl to make outside code that use it cleanerFilters { ..., ..Default::default() }instead of manually modifying a manually createdFiltersstruct