refactor: use generic string arguments

This commit is contained in:
ThetaDev 2022-11-30 13:17:28 +01:00
parent 94b55711cb
commit 8097873fe1
12 changed files with 111 additions and 60 deletions

View file

@ -9,10 +9,10 @@ use crate::{
use super::{response, RustyPipeQuery};
impl RustyPipeQuery {
pub async fn channel_rss(&self, channel_id: &str) -> Result<ChannelRss, Error> {
pub async fn channel_rss<S: AsRef<str>>(&self, channel_id: S) -> Result<ChannelRss, Error> {
let url = format!(
"https://www.youtube.com/feeds/videos.xml?channel_id={}",
channel_id
channel_id.as_ref()
);
let xml = self
.client