mirror of
https://github.com/denisidoro/navi
synced 2024-11-24 20:43:06 +00:00
Merge pull request #894 from tolik518/cargo-clippy-fix
fixed cargo clippy warnings
This commit is contained in:
commit
7575ca2435
3 changed files with 4 additions and 11 deletions
|
@ -100,7 +100,7 @@ impl Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn tealdeer(&self) -> bool {
|
pub fn tealdeer(&self) -> bool {
|
||||||
self.yaml.client.tealdeer.clone()
|
self.yaml.client.tealdeer
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn shell(&self) -> String {
|
pub fn shell(&self) -> String {
|
||||||
|
|
|
@ -80,6 +80,7 @@ pub struct Shell {
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Client {
|
pub struct Client {
|
||||||
pub tealdeer: bool,
|
pub tealdeer: bool,
|
||||||
}
|
}
|
||||||
|
@ -169,9 +170,3 @@ impl Default for Shell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Client {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self { tealdeer: false }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -81,12 +81,10 @@ impl FinderChoice {
|
||||||
&& patch < MIN_FZF_VERSION_PATCH
|
&& patch < MIN_FZF_VERSION_PATCH
|
||||||
{
|
{
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Warning: Fzf version {}.{} does not support the preview window layout used by navi.",
|
"Warning: Fzf version {major}.{minor} does not support the preview window layout used by navi.",
|
||||||
major, minor
|
|
||||||
);
|
);
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Consider updating Fzf to a version >= {}.{}.{} or use a compatible layout.",
|
"Consider updating Fzf to a version >= {MIN_FZF_VERSION_MAJOR}.{MIN_FZF_VERSION_MINOR}.{MIN_FZF_VERSION_PATCH} or use a compatible layout.",
|
||||||
MIN_FZF_VERSION_MAJOR, MIN_FZF_VERSION_MINOR, MIN_FZF_VERSION_PATCH
|
|
||||||
);
|
);
|
||||||
process::exit(1);
|
process::exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue