Skip to content

Commit

Permalink
Fixed the lint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyannide committed Nov 9, 2024
1 parent eb21840 commit b6920e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 1 addition & 5 deletions rustls-platform-verifier/src/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions rustls-platform-verifier/src/verification/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ impl Verifier {
}
}

fn extract_result_info(env: &mut JNIEnv<'_>, result: JObject<'_>) -> (VerifierStatus, Option<String>) {
fn extract_result_info(
env: &mut JNIEnv<'_>,
result: JObject<'_>,
) -> (VerifierStatus, Option<String>) {
let status_code = env
.get_field(&result, "code", "I")
.and_then(|code| code.i())
Expand All @@ -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<String> = if let Ok(msg) = msg {
if let Ok(msg) = env.get_string((&msg).into()) {
Some(msg.into())
Expand Down

0 comments on commit b6920e3

Please sign in to comment.