From b6920e35e424ca47232e780940bb44715db114ec Mon Sep 17 00:00:00 2001 From: Cyannide Date: Sat, 9 Nov 2024 12:50:24 -0600 Subject: [PATCH] Fixed the lint errors. --- rustls-platform-verifier/src/android.rs | 6 +----- rustls-platform-verifier/src/verification/android.rs | 8 +++++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/rustls-platform-verifier/src/android.rs b/rustls-platform-verifier/src/android.rs index 0d9789b..21a6a69 100644 --- a/rustls-platform-verifier/src/android.rs +++ b/rustls-platform-verifier/src/android.rs @@ -171,11 +171,7 @@ where let env = binding.env(); // 16 is the default capacity in the JVM, we can make this configurable if necessary - env.with_local_frame(16, |env| { - - f(&mut context, env) - - }) + env.with_local_frame(16, |env| f(&mut context, env)) } /// Loads and caches a class on first use diff --git a/rustls-platform-verifier/src/verification/android.rs b/rustls-platform-verifier/src/verification/android.rs index fa8dcc8..7f3641b 100644 --- a/rustls-platform-verifier/src/verification/android.rs +++ b/rustls-platform-verifier/src/verification/android.rs @@ -241,7 +241,10 @@ impl Verifier { } } -fn extract_result_info(env: &mut JNIEnv<'_>, result: JObject<'_>) -> (VerifierStatus, Option) { +fn extract_result_info( + env: &mut JNIEnv<'_>, + result: JObject<'_>, +) -> (VerifierStatus, Option) { let status_code = env .get_field(&result, "code", "I") .and_then(|code| code.i()) @@ -261,8 +264,7 @@ fn extract_result_info(env: &mut JNIEnv<'_>, result: JObject<'_>) -> (VerifierSt // Extract the `String?`. let msg = env .get_field(result, "message", "Ljava/lang/String;") - .and_then(|m| m.l()) - ; + .and_then(|m| m.l()); let msg: Option = if let Ok(msg) = msg { if let Ok(msg) = env.get_string((&msg).into()) { Some(msg.into())