feat: add commentary

This commit is contained in:
2025-09-19 21:18:26 +03:00
parent 36270c7a3f
commit 7a9ef2c48c
8 changed files with 327 additions and 10 deletions

View File

@@ -3,7 +3,7 @@ use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("io error: {0}")]
Io(#[from] std::io::Error),
Io(#[from] tokio::io::Error),
#[error("instaloader failed: {0}")]
InstaloaderFaileled(String),
@@ -24,4 +24,11 @@ pub enum Error {
Other(String),
}
impl Error {
#[inline]
pub fn other(text: impl Into<String>) -> Self {
Self::Other(text.into())
}
}
pub type Result<T> = std::result::Result<T, Error>;