Skip to content

Commit 9895564

Browse files
rsthorntonclaude
andcommitted
style: wrap long lines to satisfy rustfmt (classify_openness, --update-mode args)
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ae82bca commit 9895564

3 files changed

Lines changed: 17 additions & 9 deletions

File tree

src-tauri/src/simulation.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ pub async fn launch_simulation(params: LaunchParams) -> Result<typedb_reader::Ru
8080
.args(["--seed", &seed.to_string()])
8181
.args(["--steps", &params.steps.to_string()])
8282
.args(["--run-id", &run_id])
83-
.args(["--update-mode", params.update_mode.as_deref().unwrap_or("async")]);
83+
.args([
84+
"--update-mode",
85+
params.update_mode.as_deref().unwrap_or("async"),
86+
]);
8487

8588
if let Some(ref json_path) = params.json_path {
8689
cmd.args(["--json-path", json_path]);

src/bevy_app/data_model/validate.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ pub fn classify_openness(model: &WorldModel) -> String {
106106
if matches!(ix.ty, InteractionType::Force) {
107107
continue;
108108
}
109-
if !matches!(ix.substance.ty, SubstanceType::Energy | SubstanceType::Material) {
109+
if !matches!(
110+
ix.substance.ty,
111+
SubstanceType::Energy | SubstanceType::Material
112+
) {
110113
continue;
111114
}
112115
if ix.source.ty == IdType::Source {

src/leptos_app/simulation/launch_panel.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,18 @@ pub fn SimPanel(
142142
let update_mode = mj
143143
.as_ref()
144144
.and_then(|json| serde_json::from_str::<serde_json::Value>(json).ok())
145-
.and_then(|v| v["interactions"].as_array().map(|ixs| {
146-
ixs.iter().any(|ix| {
147-
ix["parameters"].as_array().is_some_and(|ps| {
148-
ps.iter().any(|p| {
149-
p["name"].as_str() == Some("observation")
150-
&& p["value"].as_str() == Some("true")
145+
.and_then(|v| {
146+
v["interactions"].as_array().map(|ixs| {
147+
ixs.iter().any(|ix| {
148+
ix["parameters"].as_array().is_some_and(|ps| {
149+
ps.iter().any(|p| {
150+
p["name"].as_str() == Some("observation")
151+
&& p["value"].as_str() == Some("true")
152+
})
151153
})
152154
})
153155
})
154-
}))
156+
})
155157
.map(|has_obs| if has_obs { "synchronous" } else { "async" }.to_string());
156158
let params = LaunchParams {
157159
seed,

0 commit comments

Comments
 (0)