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