diff --git a/.cargo/config.toml b/.cargo/config.toml index 4dddb54d24..cf5c88d091 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,6 @@ [target.'cfg(all())'] rustflags = [ + "-Dwarnings", "-Aclippy::reversed_empty_ranges", "-Aclippy::missing_safety_doc", "-Aclippy::let_unit_value", diff --git a/.github/workflows/.ci.yml.swp b/.github/workflows/.ci.yml.swp deleted file mode 100644 index 063ded33ee..0000000000 Binary files a/.github/workflows/.ci.yml.swp and /dev/null differ diff --git a/plugins/json_language/src/lib.rs b/plugins/json_language/src/lib.rs index 1503f9f8b2..b3c70da7a1 100644 --- a/plugins/json_language/src/lib.rs +++ b/plugins/json_language/src/lib.rs @@ -1,13 +1,12 @@ +use std::{fs, path::PathBuf}; + use plugin::prelude::*; use serde::Deserialize; -use std::fs; -use std::path::PathBuf; #[import] fn command(string: &str) -> Option>; -const BIN_PATH: &'static str = - "node_modules/vscode-json-languageserver/bin/vscode-json-languageserver"; +const BIN_PATH: &str = "node_modules/vscode-json-languageserver/bin/vscode-json-languageserver"; #[export] pub fn name() -> &'static str { @@ -51,13 +50,11 @@ pub fn fetch_server_binary(container_dir: PathBuf, version: String) -> Result Result Option { let mut last_version_dir = None; - let mut entries = fs::read_dir(&container_dir).ok()?; + let entries = fs::read_dir(&container_dir).ok()?; - while let Some(entry) = entries.next() { + for entry in entries { let entry = entry.ok()?; if entry.file_type().ok()?.is_dir() { last_version_dir = Some(entry.path());