Fix lint issues (#658)

This commit is contained in:
Denis Isidoro 2021-12-19 17:00:11 -03:00 committed by GitHub
parent 6aa8707c11
commit d672d6253d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 18 deletions

View file

@ -63,14 +63,14 @@ where
.map_err(|_| de::Error::custom(format!("Failed to deserialize finder: {}", s)))
}
#[derive(Deserialize)]
#[derive(Deserialize, Default)]
#[serde(default)]
pub struct Cheats {
pub path: Option<String>,
pub paths: Vec<String>,
}
#[derive(Deserialize)]
#[derive(Deserialize, Default)]
#[serde(default)]
pub struct Search {
pub tags: Option<String>,
@ -159,21 +159,6 @@ impl Default for Finder {
}
}
impl Default for Cheats {
fn default() -> Self {
Self {
path: None,
paths: Vec::new(),
}
}
}
impl Default for Search {
fn default() -> Self {
Self { tags: None }
}
}
impl Default for Shell {
fn default() -> Self {
Self {

View file

@ -72,7 +72,7 @@ fn interpolate_paths(paths: String) -> String {
let mut newtext = paths.to_string();
for capture in re.captures_iter(&paths) {
if let Some(c) = capture.get(0) {
let varname = c.as_str().replace("$", "").replace("{", "").replace("}", "");
let varname = c.as_str().replace('$', "").replace('{', "").replace('}', "");
if let Ok(replacement) = &env_var::get(&varname) {
newtext = newtext
.replace(&format!("${}", varname), replacement)