feat: 收口 Rust Web 3000 主链

This commit is contained in:
lix-2026
2026-05-11 13:16:34 +08:00
parent 7f3f7d4e2f
commit 17c003976b
61 changed files with 2090 additions and 2256 deletions
@@ -3156,8 +3156,11 @@ fn main() {}
.to_string();
std::thread::sleep(std::time::Duration::from_millis(5));
std::fs::write(root.join("README.md"), "---\ntitle: Stale\n---\n# External\n")
.expect("external write");
std::fs::write(
root.join("README.md"),
"---\ntitle: Stale\n---\n# External\n",
)
.expect("external write");
let error = save_local_markdown_page(
&root_uri,
@@ -3168,9 +3171,7 @@ fn main() {}
]),
)
.expect_err("stale save should fail");
assert!(error
.message()
.contains("本地 Markdown 文件已被外部修改"));
assert!(error.message().contains("本地 Markdown 文件已被外部修改"));
let saved = std::fs::read_to_string(root.join("README.md")).expect("read md");
assert!(saved.contains("# External"));