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 various components of Rust code #490

Merged
merged 10 commits into from
Sep 19, 2024

Conversation

lj3954
Copy link
Contributor

@lj3954 lj3954 commented Sep 19, 2024

Type of Change

  • Refactoring

Description

Refactor various functions to improve readability and remove duplicate code. Commits can be viewed individually for specific changes and some reasoning.

Testing

Functionality is identical to before; program does not crash.

Impact

No changes in functionality. Code is more maintainable.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no errors/warnings/merge conflicts.

@jeevithakannan2
Copy link
Contributor

Merging #338 will create a conflict with this PR. I remember adding some comments in that one too. I am sorry I will clean up the mess later in a few minutes.

@lj3954
Copy link
Contributor Author

lj3954 commented Sep 19, 2024

Merging #338 will create a conflict with this PR. I remember adding some comments in that one too. I am sorry I will clean up the mess later in a few minutes.

Comments aren't a bad thing. Pointless comments that basically just state the name of the variable or exactly what an if statement is doing (i.e. // Check whether value is equal to 0\n if value == 0 {}), rather than explaining WHY something is being done, are the problem I was pointing out.

I'll resolve the conflicts once that's merged, don't worry about it.

@jeevithakannan2
Copy link
Contributor

jeevithakannan2 commented Sep 19, 2024

Yeah thanks for your efforts @lj3954 . Like I was saying before, they were added because I was explaining my PRs to one of my friends who is a winutil fan by the way. He doesn't have a lot of coding knowledge. He understands the code base easily with more comments. I will clean out all the unwanted comments in a few minutes

@ChrisTitusTech ChrisTitusTech added the enhancement New feature or request label Sep 19, 2024
@ChrisTitusTech ChrisTitusTech merged commit a5b3df0 into ChrisTitusTech:main Sep 19, 2024
1 check passed
jeevithakannan2 added a commit to jeevithakannan2/linutil that referenced this pull request Sep 19, 2024
Added lj's thought process from ChrisTitusTech#490

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
ChrisTitusTech pushed a commit that referenced this pull request Sep 19, 2024
Added lj's thought process from #490

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
@lj3954 lj3954 deleted the various_refactors branch September 19, 2024 19:06
@lj3954 lj3954 mentioned this pull request Sep 21, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants