refactor(core): 收拢四化事实组装 - #304
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
变更
TransformationFacts模块Natal构造路径只负责编排,通过Branch与StarName读取四化事实PalacePlacement字段可见性,并集中宫名坐标查询原因
原来的
natal.rs同时承担完整命盘编排与四化关系计算,并直接访问三组平行数组。此次重构将四化规则和存储细节集中到一个内部模块,使构造流程与关系计算各自保持单一职责。影响
不修改公开接口、排盘算法、领域事实或结果物理表示。两个构造入口继续保持零堆分配。
验证
cargo fmt --all --checkcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --all-targets --locked:53 passed,1 ignoredcargo test --workspace --doc --locked:1 passedcargo test -p ziwei --test natal_exhaustive --release --locked -- --ignored:1 passedRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --lockedcargo bench -p ziwei_core --bench natal_allocations --locked:两个入口均为 0 allocation / 0 byte