STRA-338 size: fmt and baselines after merging the cuda-driver a-m and prefill-chunk follow-ups
This commit is contained in:
@@ -106,10 +106,20 @@ fn descend(gated: &mut Vec<PathBuf>) {
|
||||
let lines: Vec<&str> = text.lines().collect();
|
||||
for (index, line) in lines.iter().enumerate() {
|
||||
let trimmed = line.trim_start();
|
||||
let declared = trimmed.strip_prefix("pub(crate) mod ").or_else(|| trimmed.strip_prefix("pub(super) mod ")).or_else(|| trimmed.strip_prefix("pub mod ")).or_else(|| trimmed.strip_prefix("mod "));
|
||||
let declared = trimmed
|
||||
.strip_prefix("pub(crate) mod ")
|
||||
.or_else(|| trimmed.strip_prefix("pub(super) mod "))
|
||||
.or_else(|| trimmed.strip_prefix("pub mod "))
|
||||
.or_else(|| trimmed.strip_prefix("mod "));
|
||||
let Some(name) = declared.and_then(|rest| rest.strip_suffix(';')) else { continue };
|
||||
let mut candidates = vec![own.join(format!("{name}.rs")), own.join(name).join("mod.rs"), dir.join(format!("{name}.rs"))];
|
||||
if let Some(path) = lines[..index].iter().rev().take(3).find_map(|l| l.trim().strip_prefix("#[path = \"").and_then(|r| r.split('"').next())) {
|
||||
let mut candidates =
|
||||
vec![own.join(format!("{name}.rs")), own.join(name).join("mod.rs"), dir.join(format!("{name}.rs"))];
|
||||
if let Some(path) = lines[..index]
|
||||
.iter()
|
||||
.rev()
|
||||
.take(3)
|
||||
.find_map(|l| l.trim().strip_prefix("#[path = \"").and_then(|r| r.split('"').next()))
|
||||
{
|
||||
candidates.push(dir.join(path));
|
||||
}
|
||||
for candidate in candidates {
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
"width": 6
|
||||
},
|
||||
"leleka-cuda-driver": {
|
||||
"fn_lines": 675,
|
||||
"fn_lines": 671,
|
||||
"width": 820,
|
||||
"complexity": 661,
|
||||
"nesting": 30
|
||||
"nesting": 27
|
||||
},
|
||||
"leleka-deploy": {
|
||||
"fn_lines": 105,
|
||||
@@ -44,10 +44,10 @@
|
||||
"complexity": 8
|
||||
},
|
||||
"leleka-engine-qwen35-cuda": {
|
||||
"fn_lines": 602,
|
||||
"width": 621,
|
||||
"complexity": 580,
|
||||
"nesting": 19
|
||||
"fn_lines": 568,
|
||||
"width": 618,
|
||||
"complexity": 571,
|
||||
"nesting": 18
|
||||
},
|
||||
"leleka-experimental-ref": {
|
||||
"fn_lines": 15,
|
||||
@@ -238,8 +238,8 @@
|
||||
"nesting": 1
|
||||
},
|
||||
"leleka-engine-qwen35-cuda": {
|
||||
"fn_lines": 75,
|
||||
"width": 76,
|
||||
"fn_lines": 76,
|
||||
"width": 77,
|
||||
"complexity": 12,
|
||||
"nesting": 6
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user