docs: fix unresolved and private intra-doc links (#78)

A full `cargo doc --workspace` (and docs.rs, which builds with
`-D rustdoc::all`) emitted five broken intra-doc links. docs.rs treats
these as hard errors, so any 0.2.x doc build was at risk of aborting.

- mama.rs: `[`Fama`]` -> `[`crate::Fama`]` (Fama lives in another module)
- standard_error.rs: `[`crate::Bollinger`]` -> `[`crate::BollingerBands`]`
  (the public type is `BollingerBands`, not `Bollinger`)
- aggregator.rs: drop the link to the private `OpenBar::into_candle`,
  keep it as plain code text
- resample.rs: drop the link to the private `RolledBar::into_candle`
- csv.rs: `CandleReader::with_timestamp_parser` never existed; reword to
  state plainly that ISO/RFC timestamps must be converted to integers

Verified with `RUSTDOCFLAGS="-D rustdoc::broken_intra_doc_links \
-D rustdoc::private_intra_doc_links" cargo doc --workspace --no-deps`:
clean, zero warnings.
This commit is contained in:
kingchenc
2026-05-30 18:46:49 +02:00
committed by GitHub
parent 88f119109d
commit b654db312e
5 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -346,7 +346,7 @@ impl TickAggregator {
///
/// # Errors
/// Returns an error if the open bar's accumulated volume is non-finite
/// (see [`OpenBar::into_candle`]).
/// (see the internal `OpenBar::into_candle`).
pub fn flush(&mut self) -> Result<Option<Candle>> {
self.open_bar.take().map(OpenBar::into_candle).transpose()
}
+3 -2
View File
@@ -24,8 +24,9 @@ const REQUIRED_COLUMNS: [&str; 6] = ["timestamp", "open", "high", "low", "close"
/// Default OHLCV CSV row layout.
///
/// The timestamp is parsed as an `i64`; if your file ships an RFC3339 / ISO8601
/// string instead, use [`CandleReader::with_timestamp_parser`].
/// The timestamp is parsed as an `i64` (for example a Unix epoch). RFC3339 /
/// ISO8601 string timestamps are not handled by this layout; convert them to
/// integers before reading.
#[derive(Debug, Clone, Deserialize)]
pub struct DefaultRow {
pub timestamp: i64,
+1 -1
View File
@@ -114,7 +114,7 @@ impl Resampler {
///
/// # Errors
/// Returns an error if the open bar's accumulated volume is non-finite
/// (see [`RolledBar::into_candle`]).
/// (see the internal `RolledBar::into_candle`).
pub fn flush(&mut self) -> Result<Option<Candle>> {
self.open.take().map(RolledBar::into_candle).transpose()
}