fix(clippy): try using a `char` instead: `:`

This commit is contained in:
MedzikUser 2022-02-28 23:29:16 +01:00
parent a591d427f3
commit ee66bc93c4
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
4 changed files with 11 additions and 7 deletions

View File

@ -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};

View File

@ -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};

View File

@ -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};

View File

@ -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