Skip to content

Commit ccf12f4

Browse files
GiggleLiuclaude
andcommitted
Fix module-graph 404 on deployed site and clippy warnings
Add export_module_graph to docs.yml CI so the JSON is generated before mdbook build. Fix two clippy warnings in the example (complex type, no-op replace). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8722b36 commit ccf12f4

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
cargo run --example export_petersen_mapping
4040
cargo run --example export_graph
4141
cargo run --example export_schemas
42+
cargo run --example export_module_graph
4243
4344
- name: Build mdBook
4445
run: mdbook build

examples/export_module_graph.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ fn main() {
103103
}
104104

105105
// Add well-known non-model modules with their key items
106-
let static_modules: &[(&str, &str, &[(&str, &str, &str)])] = &[
106+
type ModuleSpec = (&'static str, &'static str, &'static [(&'static str, &'static str, &'static str)]);
107+
let static_modules: &[ModuleSpec] = &[
107108
(
108109
"traits",
109110
"core",
@@ -298,7 +299,7 @@ fn main() {
298299
ModuleNode {
299300
name: name.clone(),
300301
category: category.clone(),
301-
doc_path: format!("{}/index.html", name.replace('/', "/")),
302+
doc_path: format!("{name}/index.html"),
302303
items,
303304
}
304305
})

0 commit comments

Comments
 (0)