减少文本因子读取临时分配
This commit is contained in:
@@ -2449,6 +2449,13 @@ impl DataSet {
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
pub fn factor_text_rows_on(&self, date: NaiveDate) -> &[FactorTextValue] {
|
||||
self.factor_text_by_date
|
||||
.get(&date)
|
||||
.map(Vec::as_slice)
|
||||
.unwrap_or(&[])
|
||||
}
|
||||
|
||||
pub fn market_snapshots_on(&self, date: NaiveDate) -> Vec<&DailyMarketSnapshot> {
|
||||
self.market_by_date
|
||||
.get(&date)
|
||||
|
||||
Reference in New Issue
Block a user