This commit is contained in:
MedzikUserBot 2022-01-24 19:40:08 +00:00
parent 2d38cf7e28
commit af6830da0c
3 changed files with 5 additions and 4 deletions

View File

@ -18,6 +18,6 @@ pub async fn image_info(client: ImgurHandle, path: &str) {
match get_image(client, &image).await {
Ok(i) => print_image_info(i, false),
Err(e) => error!("{e}")
Err(e) => error!("{e}"),
}
}

View File

@ -6,7 +6,7 @@ pub mod upload_image;
use chrono::prelude::DateTime;
use chrono::Utc;
use log::{info, error};
use log::{error, info};
use std::time::{Duration, UNIX_EPOCH};
use imgurs::api::ImageInfo;
@ -52,7 +52,8 @@ pub fn print_image_info(i: ImageInfo, notify: bool) {
Notification::new()
.summary("Imgurs")
.body(&format!("Uploaded {}", i.data.link))
.show().unwrap_or_else(|e| {
.show()
.unwrap_or_else(|e| {
error!("send notification: {}", e);
exit(2)

View File

@ -17,6 +17,6 @@ pub async fn upload_image(client: ImgurHandle, path: &str) {
match imgurs::api::upload_image::upload_image(client, &image).await {
Ok(i) => print_image_info(i, true),
Err(e) => error!("{e}")
Err(e) => error!("{e}"),
}
}