mirror of
https://github.com/MedzikUser/imgurs
synced 2024-08-15 00:03:19 +00:00
fix(clippy): try using a char
instead: :
This commit is contained in:
parent
a591d427f3
commit
ee66bc93c4
4 changed files with 11 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
use crate::api::configuration::{api_url, ImgurClient};
|
||||
use super::send_api_request;
|
||||
use crate::api::configuration::{api_url, ImgurClient};
|
||||
|
||||
use reqwest::Method;
|
||||
use std::io::{Error, ErrorKind};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use super::send_api_request;
|
||||
use crate::api::configuration::{api_url, ImgurClient};
|
||||
use crate::api::ImageInfo;
|
||||
use super::send_api_request;
|
||||
|
||||
use reqwest::Method;
|
||||
use std::io::{Error, ErrorKind};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::api::configuration::{api_url, ImgurClient};
|
||||
use super::send_api_request;
|
||||
use crate::api::configuration::{api_url, ImgurClient};
|
||||
|
||||
use reqwest::Method;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
|
|
@ -6,10 +6,10 @@ fn is_program_in_path(program: &str) -> bool {
|
|||
use std::{env, fs};
|
||||
|
||||
if let Ok(path) = env::var("PATH") {
|
||||
for p in path.split(":") {
|
||||
for p in path.split(':') {
|
||||
let p_str = format!("{}/{}", p, program);
|
||||
if fs::metadata(p_str).is_ok() {
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,8 +54,12 @@ pub fn set_clipboard(content: String) {
|
|||
.spawn()
|
||||
.expect("execute command termux-clipboard-set")
|
||||
} else {
|
||||
println!("{} {}", "WARN".yellow(), "command for clipboard not found".magenta());
|
||||
return
|
||||
println!(
|
||||
"{} {}",
|
||||
"WARN".yellow(),
|
||||
"command for clipboard not found".magenta()
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
child
|
||||
|
|
Loading…
Reference in a new issue