Skip to content

Commit

Permalink
Merge pull request #894 from tolik518/cargo-clippy-fix
Browse files Browse the repository at this point in the history
fixed cargo clippy warnings
  • Loading branch information
denisidoro committed May 7, 2024
2 parents 78c5aaf + 266368c commit 7575ca2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Config {
}

pub fn tealdeer(&self) -> bool {
self.yaml.client.tealdeer.clone()
self.yaml.client.tealdeer
}

pub fn shell(&self) -> String {
Expand Down
7 changes: 1 addition & 6 deletions src/config/yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ pub struct Shell {

#[derive(Deserialize, Debug)]
#[serde(default)]
#[derive(Default)]
pub struct Client {
pub tealdeer: bool,
}
Expand Down Expand Up @@ -169,9 +170,3 @@ impl Default for Shell {
}
}
}

impl Default for Client {
fn default() -> Self {
Self { tealdeer: false }
}
}
6 changes: 2 additions & 4 deletions src/finder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,10 @@ impl FinderChoice {
&& patch < MIN_FZF_VERSION_PATCH
{
eprintln!(
"Warning: Fzf version {}.{} does not support the preview window layout used by navi.",
major, minor
"Warning: Fzf version {major}.{minor} does not support the preview window layout used by navi.",
);
eprintln!(
"Consider updating Fzf to a version >= {}.{}.{} or use a compatible layout.",
MIN_FZF_VERSION_MAJOR, MIN_FZF_VERSION_MINOR, MIN_FZF_VERSION_PATCH
"Consider updating Fzf to a version >= {MIN_FZF_VERSION_MAJOR}.{MIN_FZF_VERSION_MINOR}.{MIN_FZF_VERSION_PATCH} or use a compatible layout.",
);
process::exit(1);
}
Expand Down

0 comments on commit 7575ca2

Please sign in to comment.