Remove dead CompanyFacts earnings code and eliminate all compiler warnings
Remove ~400 lines of unused code from facts.rs that was left behind after migrating to the filing-native XBRL approach for the /em command. - Remove dead earnings functions (build_earnings_periods, etc.) - Remove unused utility functions (month_abbreviation, duration_value_for_period, etc.) - Remove unused concept constants (BASIC_EPS_CONCEPTS, COST_OF_SALES_CONCEPTS, etc.) - Simplify OverlayPeriodKind enum to only keep Any variant - Fix unused variable warnings in dei.rs and types.rs - Update test mocks to remove obsolete fields Result: 0 compiler warnings (down from 35) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1228,7 +1228,6 @@ mod tests {
|
||||
latest_filing: None,
|
||||
source_status: SourceStatus {
|
||||
companyfacts_used: true,
|
||||
latest_xbrl_parsed: false,
|
||||
degraded_reason: None,
|
||||
},
|
||||
})
|
||||
@@ -1253,7 +1252,6 @@ mod tests {
|
||||
latest_filing: None,
|
||||
source_status: SourceStatus {
|
||||
companyfacts_used: true,
|
||||
latest_xbrl_parsed: false,
|
||||
degraded_reason: None,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -17,7 +17,7 @@ fn extract_fiscal_year_from_period_end(period_end: &str) -> Option<i32> {
|
||||
|
||||
/// Helper to infer fiscal period from filing form and period dates
|
||||
fn infer_fiscal_period_from_duration(
|
||||
period_start: &str,
|
||||
_period_start: &str,
|
||||
period_end: &str,
|
||||
frequency: Frequency,
|
||||
) -> Option<String> {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -216,8 +216,10 @@ pub(crate) struct LatestXbrlFact {
|
||||
pub value: f64,
|
||||
#[allow(dead_code)]
|
||||
pub context_ref: String,
|
||||
#[allow(dead_code)]
|
||||
pub period_start: Option<String>,
|
||||
pub period_end: Option<String>,
|
||||
#[allow(dead_code)]
|
||||
pub is_instant: bool,
|
||||
pub has_dimensions: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user