fix: use AsRef generics for pagination

This commit is contained in:
ThetaDev 2022-11-30 12:42:06 +01:00
parent 85cac83070
commit 94b55711cb
4 changed files with 68 additions and 60 deletions

View file

@ -208,7 +208,7 @@ async fn playlist_cont(testfiles: &Path) {
.unwrap();
let rp = rp_testfile(&json_path);
playlist.videos.next(&rp.query()).await.unwrap().unwrap();
playlist.videos.next(rp.query()).await.unwrap().unwrap();
}
async fn video_details(testfiles: &Path) {
@ -246,7 +246,7 @@ async fn comments_top(testfiles: &Path) {
let rp = rp_testfile(&json_path);
details
.top_comments
.next(&rp.query())
.next(rp.query())
.await
.unwrap()
.unwrap();
@ -266,7 +266,7 @@ async fn comments_latest(testfiles: &Path) {
let rp = rp_testfile(&json_path);
details
.latest_comments
.next(&rp.query())
.next(rp.query())
.await
.unwrap()
.unwrap();
@ -284,7 +284,7 @@ async fn recommendations(testfiles: &Path) {
let details = rp.query().video_details("ZeerrnuLi5E").await.unwrap();
let rp = rp_testfile(&json_path);
details.recommended.next(&rp.query()).await.unwrap();
details.recommended.next(rp.query()).await.unwrap();
}
async fn channel_videos(testfiles: &Path) {
@ -384,7 +384,7 @@ async fn channel_videos_cont(testfiles: &Path) {
.unwrap();
let rp = rp_testfile(&json_path);
videos.content.next(&rp.query()).await.unwrap().unwrap();
videos.content.next(rp.query()).await.unwrap().unwrap();
}
async fn channel_playlists_cont(testfiles: &Path) {
@ -403,7 +403,7 @@ async fn channel_playlists_cont(testfiles: &Path) {
.unwrap();
let rp = rp_testfile(&json_path);
playlists.content.next(&rp.query()).await.unwrap().unwrap();
playlists.content.next(rp.query()).await.unwrap().unwrap();
}
async fn search(testfiles: &Path) {
@ -430,7 +430,7 @@ async fn search_cont(testfiles: &Path) {
let search = rp.query().search("doobydoobap").await.unwrap();
let rp = rp_testfile(&json_path);
search.items.next(&rp.query()).await.unwrap().unwrap();
search.items.next(rp.query()).await.unwrap().unwrap();
}
async fn search_playlists(testfiles: &Path) {
@ -492,7 +492,7 @@ async fn startpage_cont(testfiles: &Path) {
let startpage = rp.query().startpage().await.unwrap();
let rp = rp_testfile(&json_path);
startpage.next(&rp.query()).await.unwrap();
startpage.next(rp.query()).await.unwrap();
}
async fn trending(testfiles: &Path) {
@ -541,7 +541,7 @@ async fn music_playlist_cont(testfiles: &Path) {
.unwrap();
let rp = rp_testfile(&json_path);
playlist.tracks.next(&rp.query()).await.unwrap().unwrap();
playlist.tracks.next(rp.query()).await.unwrap().unwrap();
}
async fn music_playlist_related(testfiles: &Path) {
@ -562,7 +562,7 @@ async fn music_playlist_related(testfiles: &Path) {
let rp = rp_testfile(&json_path);
playlist
.related_playlists
.next(&rp.query())
.next(rp.query())
.await
.unwrap()
.unwrap();
@ -688,7 +688,7 @@ async fn music_search_cont(testfiles: &Path) {
let res = rp.query().music_search_tracks("black mamba").await.unwrap();
let rp = rp_testfile(&json_path);
res.items.next(&rp.query()).await.unwrap().unwrap();
res.items.next(rp.query()).await.unwrap().unwrap();
}
async fn music_search_suggestion(testfiles: &Path) {
@ -801,7 +801,7 @@ async fn music_radio_cont(testfiles: &Path) {
let res = rp.query().music_radio("RDAMVM7nigXQS1Xb0").await.unwrap();
let rp = rp_testfile(&json_path);
res.next(&rp.query()).await.unwrap().unwrap();
res.next(rp.query()).await.unwrap().unwrap();
}
async fn music_new_albums(testfiles: &Path) {