Skip to content

Commit 350e6bb

Browse files
authored
docs: Fix docs (#152)
1 parent 40b63ce commit 350e6bb

File tree

3 files changed

+31
-9
lines changed

3 files changed

+31
-9
lines changed

.github/workflows/check.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,27 @@ jobs:
8686
- name: Clippy Check
8787
run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::pedantic
8888

89+
cargo-doc:
90+
name: Cargo doc
91+
runs-on: ubuntu-latest
92+
93+
steps:
94+
- name: Harden the runner (Audit all outbound calls)
95+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
96+
with:
97+
egress-policy: audit
98+
99+
- name: Fetch Repository
100+
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
101+
102+
- name: Install stable toolchain
103+
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
104+
105+
- name: Rustdoc Check
106+
run: cargo doc --no-deps --all-features
107+
env:
108+
RUSTDOCFLAGS: -D warnings
109+
89110
typos-cli:
90111
name: typos
91112
runs-on: ubuntu-latest

src/event_scanner/scanner/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ impl EventScannerBuilder<Unspecified> {
219219
/// EventScannerBuilder::sync().from_latest(10);
220220
/// ```
221221
///
222-
/// See the [sync module documentation](sync) for details on each mode.
222+
/// See [`from_block`](EventScannerBuilder::from_block) and
223+
/// [`from_latest`](EventScannerBuilder::from_latest) for details on each mode.
223224
#[must_use]
224225
pub fn sync() -> EventScannerBuilder<Synchronize> {
225226
EventScannerBuilder::default()
@@ -319,7 +320,7 @@ impl EventScannerBuilder<Unspecified> {
319320
/// [subscribe]: EventScanner::subscribe
320321
/// [start]: EventScanner::start
321322
/// [sync_from_latest]: EventScannerBuilder::from_latest
322-
/// [reorg]: ScannerStatus::ReorgDetected
323+
/// [reorg]: crate::ScannerStatus::ReorgDetected
323324
#[must_use]
324325
pub fn latest(count: usize) -> EventScannerBuilder<LatestEvents> {
325326
EventScannerBuilder::<LatestEvents>::new(count)
@@ -367,7 +368,7 @@ impl EventScannerBuilder<SyncFromBlock> {
367368
impl<M> EventScannerBuilder<M> {
368369
/// Connects to the provider via WebSocket.
369370
///
370-
/// Final builder method: consumes the builder and returns the built [`HistoricEventScanner`].
371+
/// Final builder method: consumes the builder and returns the built [`EventScanner`].
371372
///
372373
/// # Errors
373374
///
@@ -379,7 +380,7 @@ impl<M> EventScannerBuilder<M> {
379380

380381
/// Connects to the provider via IPC.
381382
///
382-
/// Final builder method: consumes the builder and returns the built [`HistoricEventScanner`].
383+
/// Final builder method: consumes the builder and returns the built [`EventScanner`].
383384
///
384385
/// # Errors
385386
///
@@ -394,7 +395,7 @@ impl<M> EventScannerBuilder<M> {
394395

395396
/// Connects to an existing provider.
396397
///
397-
/// Final builder method: consumes the builder and returns the built [`HistoricEventScanner`].
398+
/// Final builder method: consumes the builder and returns the built [`EventScanner`].
398399
///
399400
/// # Errors
400401
///

src/event_scanner/scanner/sync/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ impl EventScannerBuilder<Synchronize> {
9696
/// confirmations. On reorg, emits [`ScannerStatus::ReorgDetected`][reorg], adjusts the next
9797
/// confirmed window (possibly re-emitting confirmed portions), and continues streaming.
9898
///
99-
/// [subscribe]: from_latest::SyncFromLatestEventScanner::subscribe
100-
/// [start]: from_latest::SyncFromLatestEventScanner::start
99+
/// [subscribe]: crate::EventScanner::subscribe
100+
/// [start]: crate::event_scanner::EventScanner::start
101101
/// [reorg]: crate::types::ScannerStatus::ReorgDetected
102102
/// [switch_to_live]: crate::types::ScannerStatus::SwitchingToLive
103103
#[must_use]
@@ -201,8 +201,8 @@ impl EventScannerBuilder<Synchronize> {
201201
/// [`ScannerStatus::ReorgDetected`][reorg], adjusts the next confirmed window (possibly
202202
/// re-emitting confirmed portions), and continues streaming.
203203
///
204-
/// [subscribe]: from_latest::SyncFromLatestEventScanner::subscribe
205-
/// [start]: from_latest::SyncFromLatestEventScanner::start
204+
/// [subscribe]: crate::EventScanner::subscribe
205+
/// [start]: crate::event_scanner::EventScanner::start
206206
/// [reorg]: crate::types::ScannerStatus::ReorgDetected
207207
/// [switch_to_live]: crate::types::ScannerStatus::SwitchingToLive
208208
#[must_use]

0 commit comments

Comments
 (0)