Improve jq microcap execution semantics
This commit is contained in:
@@ -45,7 +45,8 @@ impl TradingCalendar {
|
||||
|
||||
pub fn previous_day(&self, date: NaiveDate) -> Option<NaiveDate> {
|
||||
let idx = self.index_of(date)?;
|
||||
idx.checked_sub(1).and_then(|prev| self.days.get(prev).copied())
|
||||
idx.checked_sub(1)
|
||||
.and_then(|prev| self.days.get(prev).copied())
|
||||
}
|
||||
|
||||
pub fn trailing_days(&self, end: NaiveDate, lookback: usize) -> Vec<NaiveDate> {
|
||||
|
||||
Reference in New Issue
Block a user