commit 2b4c6992a668ec0a40bb37a7ef041bd46f8f2b11 from: witcher date: Sun Jan 8 12:42:32 2023 UTC Be pedantic about references in doc comments commit - 4846caa86f50134b6790df48298060c52944a501 commit + 2b4c6992a668ec0a40bb37a7ef041bd46f8f2b11 blob - 69b270b3a5c49ee1c5de1a076b3dc9dfc66b62b8 blob + d2e82dfcca37040e4bc3c22a04ff1468c659b780 --- src/types.rs +++ src/types.rs @@ -86,19 +86,19 @@ impl<'a> std::fmt::Display for Tag<'a> { /// The recurring tag, the contained type of [`Tag::Rec`]. /// -/// This struct describes how recurring should be handled, and can be used to create another task -/// when it gets completed, according to its rules. +/// This struct describes how recurring should be handled, and can be used to create another +/// [`Task`] when it gets completed, according to its rules. #[derive(Debug, Clone, PartialEq, Eq)] pub struct Recurring { /// Whether recurring should be strict or not. /// - /// A value of `true` means that, no matter when the task was completed, the next task created - /// will be created with a due date of a time amount after the *creation* of the completed - /// task. - /// If `false`, the new task will be created an amount of time after the *completion* of the - /// task. + /// A value of `true` means that, no matter when the [`Task`] was completed, the next [`Task`] + /// created will be created with a due date of a time amount after the *creation* of the + /// completed [`Task`]. + /// If `false`, the new [`Task`] will be created an amount of time after the *completion* of + /// the [`Task`]. pub strict: bool, - /// What interval the task should be recurring in. + /// What interval the [`Task`] should be recurring in. pub amount: TimeAmount, } @@ -166,8 +166,8 @@ impl std::fmt::Display for TimeAmount { /// The completion state of a [`Task`]. /// -/// A task can either be [`Incomplete`] or [`Complete`]. Should the task be complete, there can -/// optionally be a completion date associated with it, marking the date of completion. +/// A [`Task`] can either be [`Incomplete`] or [`Complete`]. Should the [`Task`] be complete, there +/// can optionally be a completion date associated with it, marking the date of completion. /// /// [`Completion`] derives [`Copy`] because [`NaiveDate`], the underlying type of the [`Complete`] /// variant, derives copy as well. @@ -219,9 +219,9 @@ pub struct Task<'a> { } impl<'a> Task<'a> { - /// Create a new task. + /// Create a new [`Task`]. /// - /// The tags of the task are parsed on demand from the description. + /// The tags of the [`Task`] are parsed on demand from the description. /// /// ```rust /// # use todotxt_parser::{Completion, Tag, Task, TodoError}; @@ -356,7 +356,7 @@ impl<'a> Task<'a> { } } - /// Return the projects found in the description of the task. + /// Return the projects found in the description of the [`Task`]. #[must_use] pub fn projects(&'a self) -> Vec<&'a str> { self.tags() @@ -371,7 +371,7 @@ impl<'a> Task<'a> { .collect() } - /// Return the contexts found in the description of the task. + /// Return the contexts found in the description of the [`Task`]. #[must_use] pub fn contexts(&'a self) -> Vec<&'a str> { self.tags() @@ -386,7 +386,7 @@ impl<'a> Task<'a> { .collect() } - /// Return the due date of the task, if there is one. + /// Return the due date of the [`Task`], if there is one. #[must_use] pub fn due(&self) -> Option { self.tags()