fixed cargo clippy warnings

This commit is contained in:
Anatolij Vasilev 2024-05-07 08:50:44 +02:00
parent 78c5aaf9e0
commit 266368c541
No known key found for this signature in database
GPG Key ID: E677F78EC3BFA530
3 changed files with 4 additions and 11 deletions

View File

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

View File

@ -80,6 +80,7 @@ pub struct Shell {
#[derive(Deserialize, Debug)]
#[serde(default)]
#[derive(Default)]
pub struct Client {
pub tealdeer: bool,
}
@ -169,9 +170,3 @@ impl Default for Shell {
}
}
}
impl Default for Client {
fn default() -> Self {
Self { tealdeer: false }
}
}

View File

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