From 296b25839dbbf33f3209dbae33bac5e5e509e79c Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 8 Mar 2025 05:56:01 +0900 Subject: [PATCH] chore(build): Use idiomatic api --- tonic-build/src/prost.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tonic-build/src/prost.rs b/tonic-build/src/prost.rs index 7cfb6ad08..6bf3847b2 100644 --- a/tonic-build/src/prost.rs +++ b/tonic-build/src/prost.rs @@ -172,7 +172,7 @@ impl crate::Method for TonicBuildMethod { let convert_type = |proto_type: &str, rust_type: &str| -> TokenStream { if (is_google_type(proto_type) && !compile_well_known_types) || rust_type.starts_with("::") - || NON_PATH_TYPE_ALLOWLIST.iter().any(|ty| *ty == rust_type) + || NON_PATH_TYPE_ALLOWLIST.contains(&rust_type) { rust_type.parse::().unwrap() } else if rust_type.starts_with("crate::") {