Update dependencies and version

This commit is contained in:
bytedream 2024-01-02 23:59:44 +01:00
parent 172e3612d0
commit 283a3802b2
11 changed files with 273 additions and 203 deletions

View file

@ -134,7 +134,6 @@ pub struct Archive {
pub(crate) urls: Vec<String>,
}
#[async_trait::async_trait(?Send)]
impl Execute for Archive {
fn pre_check(&mut self) -> Result<()> {
if !has_ffmpeg() {

View file

@ -45,7 +45,6 @@ impl ArchiveFilter {
}
}
#[async_trait::async_trait]
impl Filter for ArchiveFilter {
type T = Vec<SingleFormat>;
type Output = SingleFormatCollection;

View file

@ -113,7 +113,6 @@ pub struct Download {
pub(crate) urls: Vec<String>,
}
#[async_trait::async_trait(?Send)]
impl Execute for Download {
fn pre_check(&mut self) -> Result<()> {
if !has_ffmpeg() {

View file

@ -37,7 +37,6 @@ impl DownloadFilter {
}
}
#[async_trait::async_trait]
impl Filter for DownloadFilter {
type T = SingleFormat;
type Output = SingleFormatCollection;

View file

@ -24,12 +24,11 @@ pub use download::Download;
pub use login::Login;
pub use search::Search;
#[async_trait::async_trait(?Send)]
trait Execute {
fn pre_check(&mut self) -> Result<()> {
Ok(())
}
async fn execute(mut self, ctx: Context) -> Result<()>;
async fn execute(self, ctx: Context) -> Result<()>;
}
#[derive(Debug, Parser)]

View file

@ -18,7 +18,6 @@ pub struct Login {
pub remove: bool,
}
#[async_trait::async_trait(?Send)]
impl Execute for Login {
async fn execute(self, ctx: Context) -> Result<()> {
if let Some(login_file_path) = session_file_path() {

View file

@ -100,7 +100,6 @@ pub struct Search {
input: String,
}
#[async_trait::async_trait(?Send)]
impl Execute for Search {
async fn execute(self, ctx: Context) -> Result<()> {
let input = if crunchyroll_rs::parse::parse_url(&self.input).is_some() {

View file

@ -3,9 +3,6 @@ use crunchyroll_rs::{
Concert, Episode, MediaCollection, Movie, MovieListing, MusicVideo, Season, Series,
};
// Check when https://github.com/dtolnay/async-trait/issues/224 is resolved and update async-trait
// to the new fixed version (as this causes some issues)
#[async_trait::async_trait]
pub trait Filter {
type T: Send + Sized;
type Output: Send + Sized;