From 59abbe66c7f75dd3488b38aaa8fb87cad862262b Mon Sep 17 00:00:00 2001 From: Ben DiFrancesco Date: Sat, 25 Jul 2026 11:11:14 -0400 Subject: [PATCH 1/2] chore: fix clippy lints failing CI on latest nightly The clippy CI job installs the latest nightly clippy on every run, and newer lint versions now flag existing code on main: a redundant else after process::exit, redundant borrows in format! args, and an if that can be collapsed into a match guard. The variable_names and src_names_internal fixes mirror the identical changes already made on the transient branch (PR #64) so it rebases cleanly. --- src/check/validators/src_names_internal.rs | 12 +++++------- src/check/validators/variable_names.rs | 8 ++++---- src/fmt/mod.rs | 3 +-- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/check/validators/src_names_internal.rs b/src/check/validators/src_names_internal.rs index 61cf89d..7313396 100644 --- a/src/check/validators/src_names_internal.rs +++ b/src/check/validators/src_names_internal.rs @@ -23,13 +23,11 @@ pub fn validate(parsed: &Parsed) -> Vec { invalid_items.push(invalid_item); } } - SourceUnitPart::ContractDefinition(c) => { - if !matches!(c.ty, ContractTy::Library(_)) { - for el in &c.parts { - if let ContractPart::FunctionDefinition(f) = el { - if let Some(invalid_item) = validate_name(parsed, f) { - invalid_items.push(invalid_item); - } + SourceUnitPart::ContractDefinition(c) if !matches!(c.ty, ContractTy::Library(_)) => { + for el in &c.parts { + if let ContractPart::FunctionDefinition(f) = el { + if let Some(invalid_item) = validate_name(parsed, f) { + invalid_items.push(invalid_item); } } } diff --git a/src/check/validators/variable_names.rs b/src/check/validators/variable_names.rs index 3b3766f..2c0e532 100644 --- a/src/check/validators/variable_names.rs +++ b/src/check/validators/variable_names.rs @@ -63,10 +63,10 @@ fn validate_function(parsed: &Parsed, f: &FunctionDefinition) -> Vec Vec { if !is_valid_local_variable_name(&name.name, is_storage) { let message = if is_storage { - format!("Storage variable '{}' should NOT have underscore prefix", &name.name) + format!("Storage variable '{}' should NOT have underscore prefix", name.name) } else { - format!("Local variable '{}' should have underscore prefix", &name.name) + format!("Local variable '{}' should have underscore prefix", name.name) }; invalid_items.push(InvalidItem::new( ValidatorKind::Variable, diff --git a/src/fmt/mod.rs b/src/fmt/mod.rs index 19edacb..75b4188 100644 --- a/src/fmt/mod.rs +++ b/src/fmt/mod.rs @@ -83,9 +83,8 @@ fn check_formatting(taplo_opts: taplo::formatter::Options) -> Result<(), Box Date: Sat, 25 Jul 2026 11:17:04 -0400 Subject: [PATCH 2/2] chore: bump rustix and is-terminal so main builds on latest nightly Main's lockfile pinned rustix 0.36.8, which uses rustc_* attributes the current nightly compiler rejects, breaking the build/test/lint CI jobs. Lockfile taken verbatim from the transient branch (PR #64), which already contains these bumps. --- Cargo.lock | 101 +++++++++-------------------------------------------- 1 file changed, 17 insertions(+), 84 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee90355..27b3446 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -138,12 +138,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" - [[package]] name = "cfg-if" version = "1.0.0" @@ -267,27 +261,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "fixedbitset" version = "0.4.2" @@ -344,9 +317,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "indexmap" @@ -368,26 +341,15 @@ dependencies = [ "hashbrown 0.16.1", ] -[[package]] -name = "io-lifetimes" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" -dependencies = [ - "libc", - "windows-sys 0.45.0", -] - [[package]] name = "is-terminal" -version = "0.4.3" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" +checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", - "io-lifetimes", - "rustix", - "windows-sys 0.45.0", + "libc", + "windows-sys 0.61.2", ] [[package]] @@ -454,12 +416,6 @@ version = "0.2.134" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" -[[package]] -name = "linux-raw-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - [[package]] name = "lock_api" version = "0.4.9" @@ -741,20 +697,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustix" -version = "0.36.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys 0.45.0", -] - [[package]] name = "rustversion" version = "1.0.9" @@ -1133,6 +1075,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-sys" version = "0.42.0" @@ -1148,37 +1096,22 @@ dependencies = [ "windows_x86_64_msvc 0.42.1", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.1", -] - [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.42.1" +name = "windows-sys" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", + "windows-link", ] [[package]]