Skip to content

Commit a077f04

Browse files
committed
fix: Raise result error to main function
This adds a missing ? from a result type
1 parent 9b6dbcd commit a077f04

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/main.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,10 @@ fn analyse_state(
133133
.max()
134134
.ok_or_else(|| anyhow!("Error in running optimisation."))?;
135135

136-
info!(
137-
"Final score: {}",
138-
final_state
139-
.score()
140-
.ok_or_else(|| anyhow!("State has become corrupted"))
141-
);
136+
let final_score = final_state
137+
.score()
138+
.ok_or_else(|| anyhow!("State has become corrupted"))?;
139+
info!("Final score: {}", final_score);
142140

143141
let serialised = serde_json::to_string(&final_state)?;
144142

0 commit comments

Comments
 (0)