Skip to content

Commit

Permalink
Use intra-doc links and deny broken links (zslayton#94)
Browse files Browse the repository at this point in the history
Add build step for the docs
  • Loading branch information
nickelc authored Mar 21, 2022
1 parent 190640b commit d590ef5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ jobs:
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build docs
run: cargo doc --no-deps --verbose
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![deny(rust_2018_idioms)]
#![deny(broken_intra_doc_links)]

//! A cron expression parser and schedule explorer
//! # Example
Expand Down
21 changes: 7 additions & 14 deletions src/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,44 +247,37 @@ impl Schedule {
self.fields.seconds.includes(date_time.second() as Ordinal)
}

/// Returns a [TimeUnitSpec](trait.TimeUnitSpec.html) describing the years included
/// in this [Schedule](struct.Schedule.html).
/// Returns a [TimeUnitSpec] describing the years included in this [Schedule].
pub fn years(&self) -> &impl TimeUnitSpec {
&self.fields.years
}

/// Returns a [TimeUnitSpec](trait.TimeUnitSpec.html) describing the months of the year included
/// in this [Schedule](struct.Schedule.html).
/// Returns a [TimeUnitSpec] describing the months of the year included in this [Schedule].
pub fn months(&self) -> &impl TimeUnitSpec {
&self.fields.months
}

/// Returns a [TimeUnitSpec](trait.TimeUnitSpec.html) describing the days of the month included
/// in this [Schedule](struct.Schedule.html).
/// Returns a [TimeUnitSpec] describing the days of the month included in this [Schedule].
pub fn days_of_month(&self) -> &impl TimeUnitSpec {
&self.fields.days_of_month
}

/// Returns a [TimeUnitSpec](trait.TimeUnitSpec.html) describing the days of the week included
/// in this [Schedule](struct.Schedule.html).
/// Returns a [TimeUnitSpec] describing the days of the week included in this [Schedule].
pub fn days_of_week(&self) -> &impl TimeUnitSpec {
&self.fields.days_of_week
}

/// Returns a [TimeUnitSpec](trait.TimeUnitSpec.html) describing the hours of the day included
/// in this [Schedule](struct.Schedule.html).
/// Returns a [TimeUnitSpec] describing the hours of the day included in this [Schedule].
pub fn hours(&self) -> &impl TimeUnitSpec {
&self.fields.hours
}

/// Returns a [TimeUnitSpec](trait.TimeUnitSpec.html) describing the minutes of the hour included
/// in this [Schedule](struct.Schedule.html).
/// Returns a [TimeUnitSpec] describing the minutes of the hour included in this [Schedule].
pub fn minutes(&self) -> &impl TimeUnitSpec {
&self.fields.minutes
}

/// Returns a [TimeUnitSpec](trait.TimeUnitSpec.html) describing the seconds of the minute included
/// in this [Schedule](struct.Schedule.html).
/// Returns a [TimeUnitSpec] describing the seconds of the minute included in this [Schedule].
pub fn seconds(&self) -> &impl TimeUnitSpec {
&self.fields.seconds
}
Expand Down

0 comments on commit d590ef5

Please sign in to comment.