Skip to content

Blueprint planner: refactor try_make_update() - #11283

Open
jgallagher wants to merge 1 commit into
mainfrom
john/refactor-try-make-update
Open

Blueprint planner: refactor try_make_update()#11283
jgallagher wants to merge 1 commit into
mainfrom
john/refactor-try-make-update

Conversation

@jgallagher

Copy link
Copy Markdown
Contributor

Prior to this change, try_make_update() returned a (one-board-only) PlannedMgsUpdates that its caller inspected and then absorbed into the larger PlannedMgsUpdates it was building. Now, it returns an enum with explicit variants.

This is a minor readability win today, but the main motivation is that the upcoming sled evacuation work will need try_make_update() to return variants that don't fit as cleanly into PlannedMgsUpdates (i.e., "mark this sled for evacuation" and "make this evacuated sled available again").

Prior to this change, `try_make_update()` returned a (one-board-only)
`PlannedMgsUpdate` that its caller inspected and then absorbed into the
larger `PlannedMgsUpdates` it was building. Now, it returns an enum with
explicit variants.

This is a minor readability win today, but the main motivation is that
the upcoming sled evacuation work will need `try_make_update()` to
return variants that don't fit cleanly into `PlannedMgsUpdate` (i.e.,
"mark this sled for evacuation" and "make this evacuated sled available
again").
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.

1 participant