mirror of
https://github.com/MedzikUser/imgurs
synced 2024-08-15 00:03:19 +00:00
rustfmt
This commit is contained in:
parent
2d38cf7e28
commit
af6830da0c
3 changed files with 5 additions and 4 deletions
|
@ -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}"),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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}"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue