aboutsummaryrefslogtreecommitdiff
path: root/.run/src/bin/docsify-sidebar-gen.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-12 17:11:34 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-12 17:12:54 +0800
commit2efec9d3924ce1d806b04e2d51c1cda285bf501d (patch)
tree5490a4ab433f77ae0e078558028f808b1dc6087e /.run/src/bin/docsify-sidebar-gen.rs
parent9dad6b93e4e735d061db6b4349227d8f23b65116 (diff)
ci: Refactor CI workflows into single check matrix
Replace the separate code/docs CI jobs and local check flags with a unified `--check-*` flag system, enabling each check to run independently across a platform matrix.
Diffstat (limited to '.run/src/bin/docsify-sidebar-gen.rs')
-rw-r--r--.run/src/bin/docsify-sidebar-gen.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/.run/src/bin/docsify-sidebar-gen.rs b/.run/src/bin/docsify-sidebar-gen.rs
index 5beda7f..15ae184 100644
--- a/.run/src/bin/docsify-sidebar-gen.rs
+++ b/.run/src/bin/docsify-sidebar-gen.rs
@@ -67,10 +67,9 @@ fn find_content_dir(site_root: &Path) -> Option<PathBuf> {
entries.sort_by_key(|e| e.path());
for entry in entries {
let path = entry.path();
- if path.is_dir()
- && has_markdown_files(&path) {
- return Some(path);
- }
+ if path.is_dir() && has_markdown_files(&path) {
+ return Some(path);
+ }
}
}
@@ -255,8 +254,9 @@ fn natural_cmp(a: &str, b: &str) -> std::cmp::Ordering {
fn extract_leading_number(link: &str) -> usize {
if let Some(file_stem) = link.rsplit('/').next()
&& let Some(num_end) = file_stem.find('-')
- && let Ok(num) = file_stem[..num_end].parse::<usize>() {
- return num;
- }
+ && let Ok(num) = file_stem[..num_end].parse::<usize>()
+ {
+ return num;
+ }
usize::MAX
}