Skip to content

Conversation

@turbolent
Copy link
Member

@turbolent turbolent commented Dec 18, 2025

Depends on #78

Description

While trying to understand the contract, my OCD got the best of me, sorry.

Try to improve the readability of the code by e.g.:

  • Improving argument labels (avoid abbreviations)
  • Adding whitespace, e.g. between declarations, for single-line if statements
  • Chopping down parameter and argument lists onto separate lines when the are two long
  • Realigning comments, use semantic line breaks
  • Fixing document comments vs normal comments
  • Using switch statement instead of if statement when working with enum cases to get exhaustiveness checking
  • Replacing nil checks and force unwrapping (if v != nil { ... v! }) with if let statements or nil coalescing (??)
  • Removing redundant type annotations for variable declarations when they can be inferred

Best viewed by ignoring whitespace changes: https://github.com/onflow/FlowCreditMarket/pull/79/files?w=1


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent requested a review from a team as a code owner December 18, 2025 00:36
Base automatically changed from bastian/math-improvements to main December 20, 2025 00:06
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