From b7be964dce8d19abd51dbec21a3e331bf8399721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Gori=C4=8Dar?= Date: Sun, 17 Mar 2024 20:10:56 +0100 Subject: [PATCH] ci: fix doctest command, fix invalid doctests in `euphony_library` --- .github/workflows/rust-build-and-test.yml | 2 +- euphony_library/src/state/source.rs | 8 +++++--- euphony_library/src/state/transcoded.rs | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust-build-and-test.yml b/.github/workflows/rust-build-and-test.yml index c851b05..b589853 100644 --- a/.github/workflows/rust-build-and-test.yml +++ b/.github/workflows/rust-build-and-test.yml @@ -32,4 +32,4 @@ jobs: - name: Run unit and integration tests run: cargo nextest run --all-features --all-targets --workspace --verbose - name: Run documentation tests - run: cargo test --all-features --doc --verbose + run: cargo test --all-features --doc --workspace --verbose diff --git a/euphony_library/src/state/source.rs b/euphony_library/src/state/source.rs index cd7c70c..13dc390 100644 --- a/euphony_library/src/state/source.rs +++ b/euphony_library/src/state/source.rs @@ -107,11 +107,13 @@ impl SourceAlbumState { /// /// # Example /// ``` - /// let directory_path = Path::from("D:/MusicLibrary/Ed Harrison/Neotokyo"); + /// # use std::path::Path; + /// # use euphony_library::state::source::SourceAlbumState; + /// let directory_path = Path::new("D:/MusicLibrary/Ed Harrison/Neotokyo"); /// /// assert_eq!( - /// Self::get_state_file_path_for_directory(directory_path), - /// Path::from("D:/MusicLibrary/Ed Harrison/Neotokyo/.album.source-state.euphony`) + /// SourceAlbumState::get_state_file_path_for_directory(directory_path), + /// Path::new("D:/MusicLibrary/Ed Harrison/Neotokyo/.album.source-state.euphony") /// ); /// ``` pub fn get_state_file_path_for_directory>( diff --git a/euphony_library/src/state/transcoded.rs b/euphony_library/src/state/transcoded.rs index daaf91c..888f089 100644 --- a/euphony_library/src/state/transcoded.rs +++ b/euphony_library/src/state/transcoded.rs @@ -104,11 +104,13 @@ impl TranscodedAlbumState { /// /// # Example /// ``` - /// let directory_path = Path::from("D:/MusicLibrary/Ed Harrison/Neotokyo"); + /// # use std::path::Path; + /// # use euphony_library::state::transcoded::TranscodedAlbumState; + /// let directory_path = Path::new("D:/MusicLibrary/Ed Harrison/Neotokyo"); /// /// assert_eq!( - /// Self::get_state_file_path_for_directory(directory_path), - /// Path::from("D:/MusicLibrary/Ed Harrison/Neotokyo/.album.transcode-state.euphony`) + /// TranscodedAlbumState::get_state_file_path_for_directory(directory_path), + /// Path::new("D:/MusicLibrary/Ed Harrison/Neotokyo/.album.transcode-state.euphony") /// ); /// ``` pub fn get_state_file_path_for_directory>(