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 zcmeI2O^6&t6vr#^GcjN2K|BcM8rT@@>HUx;j0DmEJv}{>%`WjEM62Pq zy;Jq-)vJHKdeh5xW9n$BO!wtx2(Dd(oGAX%xO~qmJGO^}bgUJ&YO|E{mKC(ahT3!em8R|Xglbs1)y~-1QBU%d zR6r_l{R(U+voq6E(YX63?xT0zxqSUD=kP1izqykcb8&Cme67tDSguHMI zg2(^=2Y>(nzLSvOz|Y`&@D;cOJ_a9xcfp(BCGa9R2W+qmG;jdq!8EuR>;ix8Amk@- z1zZFdz}w(8;DSZ47io@MRzki3AAmF9AeaLb{DJ-X8hi>a zfM~y-2lA2%NCo~23efaAT&h2^Jg?WQM~am^-F^Br72NQ7AadCrdgcrn4B<{UpMIdU z;hL*?Ix&%Ha=YB``BuR5H1I>7>1kRv7ieXEiwCODZO#N&k8?9;c3K%b(`U_KY;+H= zZVe~4nn|?q6^LW#+Y`UrmGgP?K{|<_LJe3;sNKm2vf(?dgSeJG+hrzYo<|#@W7?bs zE=}U0Rx|w-9+I#W8j2`(;Wh)jQ|1Yk8G+?GN~^6T0}phkQ9#qnV+eTTwZ;LBYq0ie zhfAdU_a}>Nb7l&)!z^bqyUsY;I7Xp{{q-u)%4(wRKzAlx);fX=UX!DK=tQbSlhB6G z9HTv4DEgp^;agsy##)ZKF8G`UJfrp6W4p|@Oc*N29syw!FBB91qpenGyt1Q-Upnxc zI;PY>0wVe*v&Aq?N2MRt(P(pH#SPaGu#og1bv$>tLP{OiOxKjBlhbpPX#nfZBzO>d zN;LTD%_=z}V75&w=*>>$hXR9=l%vcvX^)A{?2Lk&mCj1Bo#S>V_s!{Z4=FegHdjpM z_pG7*YuPjA8|@7TgkH3v6u~y^p}wg9q89Dy4WRcWFEggzHEop9hYGBsS= zW(^8^=389!Z4$#MS8zaM#{m}s97a`1c+BAV-EoyBvoHZmGJ?`UveZzsq7kt_ifb*O zhHZJ?>X=um9K^}-9m{E91scjkWR%bQJgOnw)Op7XR&^A@7S@z8=vYEvkSt)aSLrk$O!lpb$-?t)SHoSM^e* zP%D;;mAbZ&r&DQjy;v*jh3Z1JmZ!|_u~k9(!KDFB?A;qbyT#w@c*H@M7uvS&^Cv@u jJ}9pWo#-Z}(R0 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());