From e64b67a3053dd07ee43d89027080b411c5837c8e Mon Sep 17 00:00:00 2001 From: shaunsingh Date: Thu, 28 Jul 2022 14:45:58 -0400 Subject: [PATCH] Update rust edition & clippy fixes --- Cargo.toml | 2 +- neovide-derive/Cargo.toml | 4 ++-- src/bridge/setup.rs | 2 +- src/settings/window_geometry.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4449b7f..2866e86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "neovide" version = "0.9.0" authors = ["keith "] -edition = "2018" +edition = "2021" build = "build.rs" description = "Neovide: No Nonsense Neovim Gui" repository = "https://github.com/neovide/neovide" diff --git a/neovide-derive/Cargo.toml b/neovide-derive/Cargo.toml index 983f926..5f35378 100644 --- a/neovide-derive/Cargo.toml +++ b/neovide-derive/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "neovide-derive" version = "0.1.0" -edition = "2018" +edition = "2021" [lib] proc-macro = true [dependencies] syn = "1.0" -quote = "1.0" \ No newline at end of file +quote = "1.0" diff --git a/src/bridge/setup.rs b/src/bridge/setup.rs index 3f8456f..60f6f29 100644 --- a/src/bridge/setup.rs +++ b/src/bridge/setup.rs @@ -53,7 +53,7 @@ pub async fn setup_neovide_remote_clipboard(nvim: &Neovim, neovide_ch nvim.set_var("neovide_channel_id", Value::from(neovide_channel)) .await .ok(); - nvim.execute_lua(®ISTER_CLIPBOARD_PROVIDER_LUA, vec![]) + nvim.execute_lua(REGISTER_CLIPBOARD_PROVIDER_LUA, vec![]) .await .ok(); } diff --git a/src/settings/window_geometry.rs b/src/settings/window_geometry.rs index de96001..37b8880 100644 --- a/src/settings/window_geometry.rs +++ b/src/settings/window_geometry.rs @@ -86,14 +86,14 @@ pub fn save_window_geometry( size: { window_settings .remember_window_size - .then(|| grid_size) + .then_some(grid_size) .flatten() .unwrap_or(DEFAULT_WINDOW_GEOMETRY) }, position: { window_settings .remember_window_position - .then(|| position) + .then_some(position) .flatten() .unwrap_or_default() },