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

Simplify isHealthy #58

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Simplify isHealthy #58

merged 1 commit into from
Jul 6, 2023

Conversation

QGarchery
Copy link
Contributor

Small refactor of isHealthy that I find more readable

@QGarchery QGarchery self-assigned this Jul 5, 2023
@QGarchery QGarchery requested a review from makcandrov July 5, 2023 16:00
makcandrov
makcandrov previously approved these changes Jul 5, 2023
Rubilmax
Rubilmax previously approved these changes Jul 5, 2023
@MathisGD
Copy link
Contributor

MathisGD commented Jul 5, 2023

Related to #24

MerlinEgalite
MerlinEgalite previously approved these changes Jul 5, 2023
Base automatically changed from perf/check-zero to dev July 5, 2023 16:23
@MerlinEgalite MerlinEgalite dismissed stale reviews from Rubilmax, makcandrov, and themself July 5, 2023 16:23

The base branch was changed.

Copy link
Contributor

@MathisGD MathisGD left a comment

Choose a reason for hiding this comment

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

I'm generally against strongly against early "returns" (it should not even be called return this thing but that is an other discussion).

Here the function is very simple though, and it makes sense to wanting to optimize this case as much as possible since it happens every time that a user would be withdrawing their collateral after having repay their debt.

@QGarchery QGarchery merged commit 79848ae into dev Jul 6, 2023
@QGarchery QGarchery deleted the refactor/healthy-zero branch July 6, 2023 11:41
@MathisGD MathisGD mentioned this pull request Jul 6, 2023
Merged
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.

6 participants