docs(m126 r3): 收窄「唯一一份」的说法,并把 ③ 的承诺改成真话
纯文档,零逻辑改动(`git diff` 里每一行都是 `//!` / `///`)。 P2-1「唯一一份」不成立:`cli/src/cli/help.rs` 里 `ull help instances` 的词表行是 **会打印给用户看的第二份逐字副本**。四处说法收窄为「源头表在 core + 另一处逐字副本在 help.rs,由 `help_lists_every_stable_id` 按 `ALL` 遍历守着」:`game/loader.rs` 的模块 文档(原「生产代码里这七个串只有一处」)与 `as_str` doc(原「生产代码里唯一一份 id 字面量」)、`cli/commands/instances.rs` 的模块文档(原「全仓唯一一份 id 字面量」)与 `loader_json` doc(原「两样都只该有一份」)、`presenter/dto/instances.rs` 的 as_str doc 与契约测试 doc、`addon/loader/mod.rs` 的两处「唯一真相源」。 P2-2「③ 拦得住静默变原版」对显示路径不成立:`presenter/src/host/game.rs::dto_kind` 里 糊一支 `=> Vanilla`、同时把契约与 help 补齐,三个 crate 全绿而磁贴静默显示「原版」。 现在写的是「③ 拦的是**对外词表**(加种类、改词表都红),但**拦不住显示路径**,那处目前 没有守卫(已知缺口,另行记账)」。 顺带只做排版级的行数回收:loader.rs 400 → 397(≤400,仍留余量)。 门禁:cargo fmt --all --check → FMT_OK(本轮按要求只跑 fmt)。
This commit is contained in:
1 parent
14ac0dc248
commit
f6b7759aa8
4 files changed
+35
-30
No files matched your search
@@ -76,8 +76,8 @@ impl LoaderKind {
|
||||
|
||||
/// 稳定 id(`vanilla` / `fabric` / …;GUI 与 `--json` 同词表)。
|
||||
///
|
||||
/// **委派**给 [`CoreLoaderKind::as_str`](M126):整张词表在 core 只有一份字面量
|
||||
/// (0.2.0 已发布契约),这里只剩一次结构映射。
|
||||
/// **委派**给 [`CoreLoaderKind::as_str`](M126):词表的源头表在 core(0.2.0 已发布契约;
|
||||
/// 另一处逐字副本是 `ull help instances` 的词表行),这里只剩一次结构映射。
|
||||
#[must_use]
|
||||
pub fn as_str(self) -> &'static str {
|
||||
self.to_core().as_str()
|
||||
@@ -282,7 +282,8 @@ mod tests {
|
||||
}
|
||||
|
||||
/// 对外契约:七个 id 在测试里**独立抄一遍**(0.2.0 已发布形状),并与 core 的 `ALL` 做
|
||||
/// **集合比较**——这是「加了一支枚举却没人更新对外词表」的唯一守卫。
|
||||
/// **集合比较**——这是对外词表的守卫(与 CLI 的 help 守卫互补;显示路径
|
||||
/// `presenter::host::game::dto_kind` 目前没有守卫,见 `game::loader` 的模块文档)。
|
||||
///
|
||||
/// 为什么不是编译器管:编译期只拦得到「漏 match」,而新种类在三处消费方用最省事的
|
||||
/// `=> Vanilla` 糊过去**编得过**,那时新加载器会静默显示成原版(`game::loader` 模块文档
|
||||
|
||||
Reference in new issue
Block a user