refactor: remove unnecesary if

macos-click-through
Sergio Ribera 3 years ago
parent c3533897ac
commit ed7dcf077d

@ -86,14 +86,11 @@ async fn start_neovim_runtime() {
start_ui_command_handler(nvim.clone()); start_ui_command_handler(nvim.clone());
// Verify if the files to open is more than one // Open the files into new tabs
if settings.target_files.len() > 1 { for file in settings.target_files.iter().skip(1) {
// Open the rest of the files into new tabs nvim.command(format!("tabnew {}", file).as_str())
for file in settings.target_files.iter().skip(1) { .await
nvim.command(format!("tabnew {}", file).as_str()) .unwrap_or_explained_panic("Could not create new tab");
.await
.unwrap_or_explained_panic("Could not create new tab");
}
} }
SETTINGS.read_initial_values(&nvim).await; SETTINGS.read_initial_values(&nvim).await;
SETTINGS.setup_changed_listeners(&nvim).await; SETTINGS.setup_changed_listeners(&nvim).await;

Loading…
Cancel
Save