mirror of
https://github.com/kristoferssolo/tg-relay-rs.git
synced 2026-02-25 05:08:15 +00:00
feat: add commentary
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user