diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d6e82d8..e8710d01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,11 +21,11 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] - rust: ["stable", "1.81"] + rust: ["stable", "1.83"] flags: ["", "--all-features"] exclude: # Skip because some features have higher MSRV. - - rust: "1.81" # MSRV + - rust: "1.83" # MSRV flags: "--all-features" steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index 5589b545..d40d4d9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "2" [workspace.package] authors = ["Foundry Maintainers"] version = "0.12.3" -rust-version = "1.81" +rust-version = "1.83" readme = "README.md" license = "MIT OR Apache-2.0" repository = "https://github.com/foundry-rs/compilers" diff --git a/README.md b/README.md index 13974fae..70e1f88f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ When updating this, also update: Foundry Compilers will keep a rolling MSRV (minimum supported rust version) policy of **at least** 6 months. When increasing the MSRV, the new Rust version must have been -released at least six months ago. The current MSRV is 1.81.0. +released at least six months ago. The current MSRV is 1.83.0. Note that the MSRV is not increased automatically, and only as part of a minor release. diff --git a/clippy.toml b/clippy.toml index 8c0bc009..f234c901 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.81" +msrv = "1.83" diff --git a/crates/compilers/src/compilers/solc/mod.rs b/crates/compilers/src/compilers/solc/mod.rs index 2f96f37f..218d51cc 100644 --- a/crates/compilers/src/compilers/solc/mod.rs +++ b/crates/compilers/src/compilers/solc/mod.rs @@ -201,8 +201,8 @@ impl Restriction { /// /// If given None, only returns true if no restrictions are set pub fn satisfies(&self, value: Option) -> bool { - self.min.map_or(true, |min| value.is_some_and(|v| v >= min)) - && self.max.map_or(true, |max| value.is_some_and(|v| v <= max)) + self.min.is_none_or(|min| value.is_some_and(|v| v >= min)) + && self.max.is_none_or(|max| value.is_some_and(|v| v <= max)) } /// Combines two restrictions into a new one @@ -346,7 +346,7 @@ impl CompilerSettings for SolcSettings { // Ensure that we either don't have min optimizer runs set or that the optimizer is enabled satisfies &= optimizer_runs .min - .map_or(true, |min| min == 0 || self.optimizer.enabled.unwrap_or_default()); + .is_none_or(|min| min == 0 || self.optimizer.enabled.unwrap_or_default()); satisfies } diff --git a/crates/compilers/src/lib.rs b/crates/compilers/src/lib.rs index 26f1c085..d273cbe8 100644 --- a/crates/compilers/src/lib.rs +++ b/crates/compilers/src/lib.rs @@ -403,7 +403,7 @@ impl Project { { let mut contracts = self.collect_contract_names()?; - if contracts.get(target_name).map_or(true, |paths| paths.is_empty()) { + if contracts.get(target_name).is_none_or(|paths| paths.is_empty()) { return Err(SolcError::msg(format!("No contract found with the name `{target_name}`"))); } let mut paths = contracts.remove(target_name).unwrap();