style: normalize fidc core formatting

This commit is contained in:
boris
2026-09-04 22:18:35 +08:00
parent b15b93eec1
commit 92322349d4
9 changed files with 231 additions and 219 deletions
+8 -13
View File
@@ -621,7 +621,7 @@ impl<C, R> BrokerSimulator<C, R> {
self.runtime_order_created_date.get(),
self.submission_time(),
)
.map(|(start, end)| (date.and_time(start), date.and_time(end)))
.map(|(start, end)| (date.and_time(start), date.and_time(end)))
}
fn post_close_execution_quote_window_for_submission(
@@ -1208,8 +1208,7 @@ where
matching_type: MatchingType,
) -> Option<f64> {
if self.is_post_close_fixed_price(snapshot.date) {
return (snapshot.close.is_finite() && snapshot.close > 0.0)
.then_some(snapshot.close);
return (snapshot.close.is_finite() && snapshot.close > 0.0).then_some(snapshot.close);
}
let raw_price = match matching_type {
MatchingType::MinuteBestOwn => match side {
@@ -7684,8 +7683,7 @@ where
match matching_type {
MatchingType::OpenAuction
| MatchingType::CurrentBarClose
| MatchingType::NextBarOpen
=> false,
| MatchingType::NextBarOpen => false,
MatchingType::MinuteLast => self.liquidity_limit,
MatchingType::MinuteBestOwn
| MatchingType::MinuteBestCounterparty
@@ -8082,14 +8080,11 @@ mod tests {
EquityExecutionPhase::ContinuousAuction
);
let next_open = BrokerSimulator::new(
ChinaAShareCostModel::default(),
ChinaEquityRuleHooks,
)
.with_matching_type(MatchingType::NextBarOpen)
.with_intraday_execution_start_time(
NaiveTime::from_hms_opt(15, 0, 0).expect("valid signal time"),
);
let next_open = BrokerSimulator::new(ChinaAShareCostModel::default(), ChinaEquityRuleHooks)
.with_matching_type(MatchingType::NextBarOpen)
.with_intraday_execution_start_time(
NaiveTime::from_hms_opt(15, 0, 0).expect("valid signal time"),
);
next_open
.runtime_order_created_date
.set(Some(date.pred_opt().expect("previous date")));