From 0899a45587af9f707f630af0a21b5299dc11d8df Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Wed, 12 Apr 2023 18:31:21 +0200 Subject: [PATCH] Doc strings --- src/database/json.rs | 4 ++-- src/library/beets.rs | 6 +++--- src/library/mod.rs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/database/json.rs b/src/database/json.rs index c4bf378..3f0fa14 100644 --- a/src/database/json.rs +++ b/src/database/json.rs @@ -28,7 +28,7 @@ pub struct JsonDatabase { } impl JsonDatabase { - /// Create a new JSON database with the provided backend, e.g. [JsonDatabaseFileBackend]. + /// Create a new JSON database with the provided backend, e.g. [`JsonDatabaseFileBackend`]. pub fn new(backend: Box) -> Self { JsonDatabase { backend } } @@ -58,7 +58,7 @@ pub struct JsonDatabaseFileBackend { } impl JsonDatabaseFileBackend { - /// Create a [JsonDatabaseFileBackend] that will read/write to the provided path. + /// Create a [`JsonDatabaseFileBackend`] that will read/write to the provided path. pub fn new(path: &Path) -> Self { JsonDatabaseFileBackend { path: path.to_path_buf(), diff --git a/src/library/beets.rs b/src/library/beets.rs index b407962..0bdcd52 100644 --- a/src/library/beets.rs +++ b/src/library/beets.rs @@ -106,7 +106,7 @@ trait LibraryPrivate { } impl BeetsLibrary { - /// Create a new beets library with the provided executor, e.g. [BeetsLibraryCommandExecutor]. + /// Create a new beets library with the provided executor, e.g. [`BeetsLibraryCommandExecutor`]. pub fn new(executor: Box) -> BeetsLibrary { BeetsLibrary { executor } } @@ -243,7 +243,7 @@ pub struct BeetsLibraryCommandExecutor { } impl BeetsLibraryCommandExecutor { - /// Create a new [BeetsLibraryCommandExecutor] that uses the provided beets executable. + /// Create a new [`BeetsLibraryCommandExecutor`] that uses the provided beets executable. pub fn new(bin: &str) -> Self { BeetsLibraryCommandExecutor { bin: bin.to_string(), @@ -259,7 +259,7 @@ impl BeetsLibraryCommandExecutor { } impl Default for BeetsLibraryCommandExecutor { - /// Create a new [BeetsLibraryCommandExecutor] that uses the system's default beets executable. + /// Create a new [`BeetsLibraryCommandExecutor`] that uses the system's default beets executable. fn default() -> Self { BeetsLibraryCommandExecutor::new("beet") } diff --git a/src/library/mod.rs b/src/library/mod.rs index b73079a..1499097 100644 --- a/src/library/mod.rs +++ b/src/library/mod.rs @@ -17,19 +17,19 @@ pub enum QueryOption { } impl QueryOption { - /// Return `true` if [QueryOption] is not [QueryOption::None]. + /// Return `true` if [`QueryOption`] is not [`QueryOption::None`]. pub fn is_some(&self) -> bool { !matches!(self, QueryOption::None) } - /// Return `true` if [QueryOption] is [QueryOption::None]. + /// Return `true` if [`QueryOption`] is [`QueryOption::None`]. pub fn is_none(&self) -> bool { matches!(self, QueryOption::None) } } impl Default for QueryOption { - /// Create a [QueryOption::None] for type `T`. + /// Create a [`QueryOption::None`] for type `T`. fn default() -> Self { Self::None }