Skip to content

Commit

Permalink
revert then_some due to early evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinquaXD committed Mar 7, 2025
1 parent e797f54 commit d38db67
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions crates/driver/src/domain/competition/order/app_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ impl AppDataRetriever {
let appdata: AppDataDocument =
serde_json::from_str(&response.text().await?)
.context("invalid app data document")?;
(appdata.full_app_data != app_data::EMPTY).then_some(
self_
.0
.app_data_validator
.validate(&appdata.full_app_data.into_bytes())?,
)
match appdata.full_app_data == app_data::EMPTY {
true => None, // empty app data
false => Some(
self_
.0
.app_data_validator
.validate(&appdata.full_app_data.into_bytes())?,
),
}
}
};

Expand Down

0 comments on commit d38db67

Please sign in to comment.