Skip to content

Commit 80c090b

Browse files
committed
docs: update docs to reflect the current API
1 parent 2f5567f commit 80c090b

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

engine-base/src/interface.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ use async_trait::async_trait;
22
use unm_types::{Context, RetrievedSongInfo, SerializedIdentifier, Song, SongSearchInformation};
33

44
#[async_trait]
5-
/// The engine that can search and track the specified [`Song`].
5+
/// The engine that can search and track the specified `Song`.
66
pub trait Engine {
77
/// Search an audio matched the `info`, and
8-
/// return the identifier for retrieving audio URL with [`retrieve`].
8+
/// return the identifier for retrieving audio URL with `retrieve`.
99
async fn search<'a>(
1010
&self,
1111
info: &'a Song,

engines/joox/src/lib.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
//! the `joox:cookie` config.
66
//!
77
//! You can configure the cookie in the
8-
//! `ctx.config` HashMap. For example:
8+
//! `ctx.config` [`unm_types::config::ConfigManager`].
9+
//! You can set up a [`unm_types::config::ConfigManager`] like this:
910
//!
1011
//! ```
12+
//! # use unm_types::config::ConfigManager;
1113
//! # use std::collections::HashMap;
12-
//!
13-
//! let config = {
14-
//! let mut hm = HashMap::<String, String>::new();
14+
//! let config = ConfigManager::new({
15+
//! let mut hm = HashMap::new();
1516
//! hm.insert(
16-
//! "joox:cookie".to_string(),
17+
//! "joox:cookie".into(),
1718
//! r#"wmid=<your_wmid>; session_key=<your_session_key>;"#.to_string()
1819
//! );
1920
//! hm
20-
//! };
21+
//! });
2122
//! ```
2223
2324
use std::borrow::Cow;

engines/ytdl/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! the specified `youtube-dl`-like command.
55
//!
66
//! The default is `yt-dlp`. You can configure it by passing
7-
//! `ytdl:exe` in the ctx.config [`HashMap`] field.
7+
//! `ytdl:exe` in the ctx.config [`std::collections::HashMap`] field.
88
99
use std::borrow::Cow;
1010

0 commit comments

Comments
 (0)