Skip to content

refactor(sysctl): Refactor some controller code - #146

Merged
orhun merged 6 commits into
orhun:mainfrom
matthiasbeyer:refactor-controller-code
Oct 28, 2023
Merged

orhun merged 6 commits into
orhun:mainfrom
matthiasbeyer:refactor-controller-code

Conversation

@matthiasbeyer

Copy link
Copy Markdown
Contributor

Description

Some more code refactoring

Motivation and Context

Not required at all, just found that nice.

How Has This Been Tested?

It hasn't 😆

Screenshots / Logs (if applicable)

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This makes the code a bit less "mutable", so to say.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This patch refactors the two nested if expressions into one if.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
@matthiasbeyer
matthiasbeyer requested a review from orhun as a code owner October 27, 2023 12:59

@orhun orhun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐻🐻🐻

@matthiasbeyer

Copy link
Copy Markdown
Contributor Author

A quick bisect told me that the first patch of this series broke this... which I do not understand... do you have some insight?

@orhun

orhun commented Oct 28, 2023

Copy link
Copy Markdown
Owner

Yup, I just checked cargo run -- -A and it lists only the deprecated parameters.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
@matthiasbeyer
matthiasbeyer force-pushed the refactor-controller-code branch from 0d2ae87 to f92f12d Compare October 28, 2023 11:54
@matthiasbeyer

Copy link
Copy Markdown
Contributor Author

Should be fixed now, please have another look! 🎉

@codecov-commenter

codecov-commenter commented Oct 28, 2023 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.09%. Comparing base (76e2224) to head (189449c).
⚠️ Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
systeroid-core/src/sysctl/controller.rs 81.25% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #146      +/-   ##
==========================================
- Coverage   76.22%   76.09%   -0.13%     
==========================================
  Files          23       23              
  Lines        1501     1497       -4     
==========================================
- Hits         1144     1139       -5     
- Misses        357      358       +1     
Flag Coverage Δ
unit-tests 76.09% <81.25%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@orhun orhun changed the title Refactor some controller code refactor(sysctl): Refactor some controller code Oct 28, 2023
@orhun
orhun merged commit f0b811d into orhun:main Oct 28, 2023
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.

3 participants