refactor: コア読み込みの条件分岐を共通化 #1651
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
内容
コア読み込みの条件分岐を共通化するリファクタリングを提案します。
他 PR のレビュー過程でコアの読み込み周りがネストで読みづらいとの指摘があった。
#1645 によりネストの1部が解消したため、これに引き続き、条件分岐の整理が求められる。
このような背景から、コア読み込みの条件分岐を共通化するリファクタリングを提案します。
関連 Issue
ref #1645
その他
「フォールバックっぽいが配置がよくわからないネスト」が残ったのですが、フォールバックの場合は順序変更が挙動を変えてしまうため手つかずです(ネスト完全解消ならず)。
そのため TODO にメモを残しています。
もし @Hiroshiba さんがここの詳細をご存知でしたらレビュー工程中で更に修正を加えたいと思います。なにかご存知でしょうか?