This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
Refactor: shorten & un-nest functions, re-think return values #180
Labels
difficulty: medium
Somewhat difficult to solve
priority: medium
Medium priority for the Knurling team
status: needs PR
Issue just needs a Pull Request implementing the changes
type: enhancement
Enhancement or feature request
Opening this issue for visibility (and also because I'd like to do this :D)
Imo it'd help with readability and maintainability to do a refactoring run.
Things that I've been bumping into:
notmain()
could be pulled into separate functions for readabilityconstruct_backtrace()
is pretty long and involved; amount of parameters is smellyconstruct_backtrace()
always returns OK, even if there was an exception (then it's anOK(Some(TopException))
). Returning a Result<(), TopException> would be more intuitive imo, but this could also be that I'm misunderstandinganyhow::Error
update_cfa()
has another unintuive return value, could beOption<new_cfa>
imoThese can also be sneaked in as drive-bys on bugfixes and feature implementation.
The text was updated successfully, but these errors were encountered: