refactor: remove instaloader errors

This commit is contained in:
Kristofers Solo 2025-10-27 11:24:15 +02:00
parent 40ae0b7371
commit 2347c1b440
Signed by: kristoferssolo
GPG Key ID: 74FF8144483D82C8
2 changed files with 1 additions and 10 deletions

View File

@ -34,7 +34,7 @@ pub struct DownloadResult {
/// ///
/// # Arguments /// # Arguments
/// ///
/// `cmd` is the command name (e.g. "yt-dlp" or "instaloader"). /// `cmd` is the command name (e.g. "yt-dlp").
/// `args` are the command arguments (owned Strings so callers can build dynamic args). /// `args` are the command arguments (owned Strings so callers can build dynamic args).
/// ///
/// # Errors /// # Errors
@ -64,7 +64,6 @@ async fn run_command_in_tempdir(cmd: &str, args: &[&str]) -> Result<DownloadResu
} }
let err = match cmd { let err = match cmd {
"instaloader" => Error::instaloader_failed(stderr),
"yt-dlp" => Error::ytdlp_failed(stderr), "yt-dlp" => Error::ytdlp_failed(stderr),
_ => Error::Other(format!("{cmd} failed: {stderr}")), _ => Error::Other(format!("{cmd} failed: {stderr}")),
}; };

View File

@ -5,9 +5,6 @@ pub enum Error {
#[error("io error: {0}")] #[error("io error: {0}")]
Io(#[from] tokio::io::Error), Io(#[from] tokio::io::Error),
#[error("instaloader failed: {0}")]
InstaloaderFailed(String),
#[error("yt-dpl failed: {0}")] #[error("yt-dpl failed: {0}")]
YTDLPFailed(String), YTDLPFailed(String),
@ -39,11 +36,6 @@ impl Error {
Self::Other(text.into()) Self::Other(text.into())
} }
#[inline]
pub fn instaloader_failed(text: impl Into<String>) -> Self {
Self::InstaloaderFailed(text.into())
}
#[inline] #[inline]
pub fn ytdlp_failed(text: impl Into<String>) -> Self { pub fn ytdlp_failed(text: impl Into<String>) -> Self {
Self::YTDLPFailed(text.into()) Self::YTDLPFailed(text.into())