mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 03:23:05 +00:00
Fix lint issues (#658)
This commit is contained in:
parent
6aa8707c11
commit
d672d6253d
2 changed files with 3 additions and 18 deletions
|
@ -63,14 +63,14 @@ where
|
||||||
.map_err(|_| de::Error::custom(format!("Failed to deserialize finder: {}", s)))
|
.map_err(|_| de::Error::custom(format!("Failed to deserialize finder: {}", s)))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub struct Cheats {
|
pub struct Cheats {
|
||||||
pub path: Option<String>,
|
pub path: Option<String>,
|
||||||
pub paths: Vec<String>,
|
pub paths: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize, Default)]
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub struct Search {
|
pub struct Search {
|
||||||
pub tags: Option<String>,
|
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 {
|
impl Default for Shell {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|
|
@ -72,7 +72,7 @@ fn interpolate_paths(paths: String) -> String {
|
||||||
let mut newtext = paths.to_string();
|
let mut newtext = paths.to_string();
|
||||||
for capture in re.captures_iter(&paths) {
|
for capture in re.captures_iter(&paths) {
|
||||||
if let Some(c) = capture.get(0) {
|
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) {
|
if let Ok(replacement) = &env_var::get(&varname) {
|
||||||
newtext = newtext
|
newtext = newtext
|
||||||
.replace(&format!("${}", varname), replacement)
|
.replace(&format!("${}", varname), replacement)
|
||||||
|
|
Loading…
Reference in a new issue