Skip to content

Commit cc1e6ed

Browse files
committed
style: cargo fmt
1 parent 83134cc commit cc1e6ed

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

engines/pyncm/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ async fn fetch_song_info(id: &str, ctx: &Context) -> anyhow::Result<PyNCMRespons
9090
)?;
9191

9292
let client = build_client(ctx.proxy_uri.as_deref())?;
93-
let response = client.get(url).header(HOST, "music.163-my-beloved.com").send().await?;
93+
let response = client
94+
.get(url)
95+
.header(HOST, "music.163-my-beloved.com")
96+
.send()
97+
.await?;
9498
Ok(response.json::<PyNCMResponse>().await?)
9599
}
96100

engines/qq/src/api.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ pub async fn search_by_keyword(keyword: &str, ctx: &Context) -> QQApiModuleResul
5050
.await
5151
.map_err(QQApiModuleError::ResponseJsonDeserializeFailed)?;
5252

53-
let data = QQSongData::deserialize(json.pointer("/search/data/body/song").ok_or(UnableToExtractJson {
54-
json_pointer: "/search/data/body/song",
55-
expected_type: "QQSongData",
56-
})?)
53+
let data = QQSongData::deserialize(json.pointer("/search/data/body/song").ok_or(
54+
UnableToExtractJson {
55+
json_pointer: "/search/data/body/song",
56+
expected_type: "QQSongData",
57+
},
58+
)?)
5759
.map_err(QQApiModuleError::JsonDeserializeFailed)?;
5860

5961
Ok(data)
@@ -140,9 +142,7 @@ fn construct_search_url(keyword: &str) -> QQApiModuleResult<Url> {
140142

141143
Ok(Url::parse_with_params(
142144
"https://u.y.qq.com/cgi-bin/musicu.fcg",
143-
&[
144-
("data", data.to_string()),
145-
]
145+
&[("data", data.to_string())],
146146
)?)
147147
}
148148

0 commit comments

Comments
 (0)