Skip to content

Commit 9bc2e11

Browse files
committed
fix(server): use clone_from for TLS client CA assignment
clippy 1.95.0 rejects assigning the result of `Clone::clone()` to an existing variable under `-D warnings` (`assigning_clones`). Switch to `clone_from(&...)` to satisfy the lint and avoid the redundant allocation.
1 parent ac5e34e commit 9bc2e11

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/openshell-server/src

‎crates/openshell-server/src/cli.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ fn merge_file_into_args(args: &mut RunArgs, file: &GatewayFileSection, matches:
469469
args.tls_key = Some(tls.key_path.clone());
470470
}
471471
if args.tls_client_ca.is_none() && arg_defaulted(matches, "tls_client_ca") {
472-
args.tls_client_ca = tls.client_ca_path.clone();
472+
args.tls_client_ca.clone_from(&tls.client_ca_path);
473473
}
474474
}
475475
// OIDC fields

0 commit comments

Comments
 (0)