diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7f466bd2..bbf217f2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.80.1" +channel = "1.81.0" profile = "default" diff --git a/src/lib.rs b/src/lib.rs index e9e9e7ff..e6cb2246 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1288,8 +1288,9 @@ impl ResolverGeneric { let mut has_dot = false; let mut without_dot = false; for key in map.keys() { - has_dot = has_dot || key.starts_with(|s| s == '.' || s == '#'); - without_dot = without_dot || !key.starts_with(|s| s == '.' || s == '#'); + let starts_with_dot_or_hash = key.starts_with(['.', '#']); + has_dot = has_dot || starts_with_dot_or_hash; + without_dot = without_dot || !starts_with_dot_or_hash; if has_dot && without_dot { return Err(ResolveError::InvalidPackageConfig( package_url.join("package.json"), diff --git a/src/tsconfig.rs b/src/tsconfig.rs index 0de8e8ec..6a675442 100644 --- a/src/tsconfig.rs +++ b/src/tsconfig.rs @@ -146,7 +146,7 @@ impl TsConfig { // Copied from parcel // pub fn resolve_path_alias(&self, specifier: &str) -> Vec { - if specifier.starts_with(|s| s == '/' || s == '.') { + if specifier.starts_with(['/', '.']) { return vec![]; }