v0.12.0-preety_code

This commit is contained in:
Mateusz Gruszczyński
2026-09-03 15:33:37 +02:00
parent be67932b47
commit 07be4b85d9
87 changed files with 11691 additions and 3172 deletions
+7 -2
View File
@@ -226,7 +226,10 @@ fn main() {
.file_stem()
.and_then(|value| value.to_str())
.expect("UTF-8 preset id");
if !stem.chars().all(|ch| ch.is_ascii_alphanumeric() || ch == '-' || ch == '_') {
if !stem
.chars()
.all(|ch| ch.is_ascii_alphanumeric() || ch == '-' || ch == '_')
{
panic!("{filename}: filename may only contain ASCII letters, digits, '-' and '_'");
}
let source = fs::read_to_string(&path)
@@ -260,7 +263,9 @@ fn main() {
.get("flow")
.and_then(Value::as_object)
.unwrap_or_else(|| panic!("{filename}: flow must be an object"));
if !flow.get("nodes").is_some_and(Value::is_array) || !flow.get("edges").is_some_and(Value::is_array) {
if !flow.get("nodes").is_some_and(Value::is_array)
|| !flow.get("edges").is_some_and(Value::is_array)
{
panic!("{filename}: flow.nodes and flow.edges must be arrays");
}
preset_manifest.push(json!({