From 073bd767f247161285d38b3628dafd48e6549986 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 10 Aug 2022 17:50:44 -0700 Subject: [PATCH] Fixed build errors in json_language --- .cargo/config.toml | 1 + .github/workflows/.ci.yml.swp | Bin 12288 -> 0 bytes plugins/json_language/src/lib.rs | 23 ++++++++++------------- 3 files changed, 11 insertions(+), 13 deletions(-) delete mode 100644 .github/workflows/.ci.yml.swp 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 063ded33eec61c5c7dd50a9cea1af60dc3d6edfc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmYc?2=nw+u+TGNU|?VnU|`5{{gU)Rav~pZDFZ`pW_Ds_P9jJKFZP9~E7tW*Om@o8 z&(?L!EYi!#PfpB1)m8^JP`{ukKPxr4q*%WyHAP=9J+maEG)ccazbHE`C%?Q{KRHvc zG8auRs!5}~(GVC70n$T&m%-S`&;X=QSxHerSSS?49L1v{Fd71*Aut*OqaiRF0;3@? z8UmvsFd70QBm_zd7#Zpr7#NtK{>_BajA%5JJ4%g)z-S1JhQMeDjE2By2#kinXb6mk zz-S1JhQMeDjE2By2n@jxNK9d1IK|As(8UUw|A+PezwT*)z{bGvgO!2d9xDUGX;ub?eXNl9>IB8v5KMEUP96<`(GWln z0R=d4_YCm}b&3!1_jdKOQc$U`RwzzQE=nya)hWi>(w&5{uGPOZ1CUb5awFQ}v@#Q}j}D(~;Dr z6eXsWpy@8pEXhDvoS6o7ZAoHLNpW~)NrnbwZI@nAYMPFMdQoaxv3^Nnda-_)x+b#o z^AdAYtrS8Fa`F>X6cP&x6p~8wQgTuiO7az;?or50gELDKVb0Q3C@luLy*NLuq@XCj zpjbaKxg;|`Pd7b77pl>r%#Z=e69tJS8ASLM;vn=e!0uaw7Zq%6p`Of0O-w1)&rQtC zQ%CkE#I+DN7VDRS{i~Z;RFavNm|WseW(0Mpt^&kOSmF8I~6ekyD7L@2i!jb`!RA5Fs7o{eaq#}hicD-eZIhiSmC8@e)sYS(^`FT)N z6coseYMAw5P;(Vv=E4nDP)N>6P0X`WNK4EqMkG_zphpeI$W|4V7MGM3 zK(m)ZVoHiad17&{v5{_hVsR$iRs{u2brlw7@n$Bvi3J5Ysk$kNMdg`@@W-Y;F|jB) zgP?}e0#Jl16qh6>7h=p8kIE0gl1J;r>A`(6Rzrvf)vP$U#^Xg$BC@ z`8oQ!5;P5_5Mi3HqqBc-yt8Xih^L#Uvtx)W4yWN(hsP{b_h1+S(}`4Y>q1LCa3Cru z=qePa=A`Ln>pTRJ#=-@qyzjIk6}`Um>Y9 zGbcqsS2rm$uUJ7>H!&wiH!U@>q_iltSOIJ}$U>NzAf?IqIXQ_*3Q3uHiA9;I#b7mH z0#uG58C;TDT%w?>3o4b03lfu46?Ap;@^#Y^Gjnv)5}_#qVRleyo&rb*#5|Bu*vw4M z$t)o;yCFkcB z_fsv9g!}>^QiCl(e)UZ8u20o(e8b3rcfx;)_xXOH+$WAY}l^?Mh`( erJ!~dLKxI402_yDLUD!_1E>UHfMj)NPX++@EoJfm 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());