Profile picture processing
This is still single-threaded, so perf is pretty bad. Will need to think about how to do this more efficiently in a web context where we don't have threading.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
use shatter::parser;
|
||||
|
||||
#[derive(Eq, PartialEq, Debug)]
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
Nostr(enostr::Error),
|
||||
Shatter(parser::Error),
|
||||
Image(image::error::ImageError),
|
||||
Generic(String),
|
||||
}
|
||||
|
||||
@@ -19,6 +20,12 @@ impl From<parser::Error> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<image::error::ImageError> for Error {
|
||||
fn from(err: image::error::ImageError) -> Self {
|
||||
Error::Image(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<enostr::Error> for Error {
|
||||
fn from(err: enostr::Error) -> Self {
|
||||
Error::Nostr(err)
|
||||
|
||||
Reference in New Issue
Block a user