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 suggest_single_disk_layout() #2508

Merged
merged 1 commit into from
May 17, 2024

Conversation

codefiles
Copy link
Contributor

@codefiles codefiles commented May 15, 2024

  • Simplify home partition conditional and use less indentation
  • Simplify root length conditional by de-duplicating repeated home partition conditional checks
  • Only call process_root_partition_size() when it is required
  • Rename process_root_partition_size() parameter available_space -> total_size for increased clarity
  • Consolidate accounting of end alignment buffer

Bonus: -3 lines

@codefiles codefiles requested a review from Torxed as a code owner May 15, 2024 22:30
@codefiles
Copy link
Contributor Author

codefiles commented May 17, 2024

I have more refactors like this for various functions. I am unsure if I should submit pull request for them. Would they possibly be considered too minor and therefore unhelpful?

@svartkanin svartkanin merged commit 15ee84b into archlinux:master May 17, 2024
6 checks passed
@svartkanin
Copy link
Collaborator

I think any refactoring that improves the code quality and readability is welcome

@codefiles
Copy link
Contributor Author

Great. Thanks.

@codefiles codefiles deleted the single-disk-layout branch May 17, 2024 22:54
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

Successfully merging this pull request may close these issues.

2 participants