Skip to content

Commit b7be964

Browse files
committed
ci: fix doctest command, fix invalid doctests in euphony_library
1 parent 649c17e commit b7be964

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/rust-build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
- name: Run unit and integration tests
3333
run: cargo nextest run --all-features --all-targets --workspace --verbose
3434
- name: Run documentation tests
35-
run: cargo test --all-features --doc --verbose
35+
run: cargo test --all-features --doc --workspace --verbose

euphony_library/src/state/source.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,13 @@ impl SourceAlbumState {
107107
///
108108
/// # Example
109109
/// ```
110-
/// let directory_path = Path::from("D:/MusicLibrary/Ed Harrison/Neotokyo");
110+
/// # use std::path::Path;
111+
/// # use euphony_library::state::source::SourceAlbumState;
112+
/// let directory_path = Path::new("D:/MusicLibrary/Ed Harrison/Neotokyo");
111113
///
112114
/// assert_eq!(
113-
/// Self::get_state_file_path_for_directory(directory_path),
114-
/// Path::from("D:/MusicLibrary/Ed Harrison/Neotokyo/.album.source-state.euphony`)
115+
/// SourceAlbumState::get_state_file_path_for_directory(directory_path),
116+
/// Path::new("D:/MusicLibrary/Ed Harrison/Neotokyo/.album.source-state.euphony")
115117
/// );
116118
/// ```
117119
pub fn get_state_file_path_for_directory<P: AsRef<Path>>(

euphony_library/src/state/transcoded.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,13 @@ impl TranscodedAlbumState {
104104
///
105105
/// # Example
106106
/// ```
107-
/// let directory_path = Path::from("D:/MusicLibrary/Ed Harrison/Neotokyo");
107+
/// # use std::path::Path;
108+
/// # use euphony_library::state::transcoded::TranscodedAlbumState;
109+
/// let directory_path = Path::new("D:/MusicLibrary/Ed Harrison/Neotokyo");
108110
///
109111
/// assert_eq!(
110-
/// Self::get_state_file_path_for_directory(directory_path),
111-
/// Path::from("D:/MusicLibrary/Ed Harrison/Neotokyo/.album.transcode-state.euphony`)
112+
/// TranscodedAlbumState::get_state_file_path_for_directory(directory_path),
113+
/// Path::new("D:/MusicLibrary/Ed Harrison/Neotokyo/.album.transcode-state.euphony")
112114
/// );
113115
/// ```
114116
pub fn get_state_file_path_for_directory<P: AsRef<Path>>(

0 commit comments

Comments
 (0)