Skip to content

Commit

Permalink
meshtls-rustls: fix clippy .ok().expect() lints in tests (#2017)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hawkw authored Nov 29, 2022
1 parent 79846c9 commit e5f25ed
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions linkerd/meshtls/rustls/src/creds/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit e5f25ed

Please sign in to comment.