From 893f98d2cfd3f50e0ac7e2091ca48c71493b06de Mon Sep 17 00:00:00 2001 From: Lyude Paul Date: Fri, 13 Sep 2024 13:11:01 -0400 Subject: [PATCH] Fix some new clippy errors --- src/nvim/mod.rs | 2 +- src/plug_manager/plugin_settings_dlg.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvim/mod.rs b/src/nvim/mod.rs index 79866013..7823cf4c 100644 --- a/src/nvim/mod.rs +++ b/src/nvim/mod.rs @@ -518,7 +518,7 @@ pub fn start<'a>( .arg("--cmd") .arg("let g:GtkGuiLoaded = 1") .arg("--cmd") - .arg(&format!( + .arg(format!( "let &rtp.=',{}'", env::var("NVIM_GTK_RUNTIME_PATH").unwrap_or_else(|_| env!("RUNTIME_PATH").into()) )) diff --git a/src/plug_manager/plugin_settings_dlg.rs b/src/plug_manager/plugin_settings_dlg.rs index 1cfcd0a1..5c2a3308 100644 --- a/src/plug_manager/plugin_settings_dlg.rs +++ b/src/plug_manager/plugin_settings_dlg.rs @@ -106,7 +106,7 @@ impl<'a> Builder<'a> { } fn extract_name(path: &str) -> Option { - if let Some(idx) = path.rfind(|c| c == '/' || c == '\\') { + if let Some(idx) = path.rfind(['/', '\\']) { if idx < path.len() - 1 { let path = path.trim_end_matches(".git"); Some(path[idx + 1..].to_owned())