Refactor the main user count chart copying into a loop.
This commit is contained in:
parent
4c38866de8
commit
d615aa2843
|
@ -136,16 +136,12 @@ pub async fn run() -> Result<()> {
|
||||||
write_assets(&output).await?;
|
write_assets(&output).await?;
|
||||||
|
|
||||||
if let Some(group) = user_count_group {
|
if let Some(group) = user_count_group {
|
||||||
let path =
|
for dir in ["charts", "charts-untruncated"] {
|
||||||
output.join(&format!("charts/user-count/{}.svg", &group.name));
|
let from_path =
|
||||||
copy(path, output.join("charts/main-user-count.svg")).await?;
|
output.join(&format!("{}/user-count/{}.svg", dir, &group.name));
|
||||||
|
let to_path = output.join(format!("{}/main-user-count.svg", dir));
|
||||||
let path = output.join(&format!(
|
copy(from_path, to_path).await?;
|
||||||
"charts-untruncated/user-count/{}.svg",
|
}
|
||||||
&group.name
|
|
||||||
));
|
|
||||||
copy(path, output.join("charts-untruncated/main-user-count.svg"))
|
|
||||||
.await?;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue