From 23eb6ac34af9f280157827773087e9d5ea9eeb03 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Mon, 28 Nov 2022 09:38:05 -0800 Subject: [PATCH] meshtls-rustls: fix clippy `.ok().expect()` lints in tests This fixes a new Clippy lint for uses of `.ok().expect("...")` on `Result`s that could just be replaced with `.expect("...")`. This pattern shows up in a couple of the meshtls-rustls tests, and the Clippy lint was causing CI to fail. --- linkerd/meshtls/rustls/src/creds/receiver.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/linkerd/meshtls/rustls/src/creds/receiver.rs b/linkerd/meshtls/rustls/src/creds/receiver.rs index 87493820e7..0b69b63095 100644 --- a/linkerd/meshtls/rustls/src/creds/receiver.rs +++ b/linkerd/meshtls/rustls/src/creds/receiver.rs @@ -97,7 +97,6 @@ mod tests { let server_config = Arc::new(empty_server_config()); server_tx .send(server_config.clone()) - .ok() .expect("receiver is held"); assert!(Arc::ptr_eq(&server.config(), &server_config)); @@ -127,7 +126,6 @@ mod tests { assert!(!Arc::ptr_eq(&update_config, &init_config)); server_tx .send(update_config.clone()) - .ok() .expect("receiver is held"); // Give the update task a chance to run.