Skip to content

Commit

Permalink
cfg! test for clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuele-em committed Jun 16, 2024
1 parent e23fd7e commit 020a7bc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions proxyapi/src/ca/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ pub struct Ssl {

impl Default for Ssl {
fn default() -> Self {
#[allow(clippy::all)]
let private_key_bytes: &[u8] = include_bytes!("proxelar.key");
#[allow(clippy::all)]
let ca_cert_bytes: &[u8] = include_bytes!("proxelar.cer");
let private_key_bytes: &[u8] = if cfg!(test) {&[]} else {include_bytes!("proxelar.key")};
let ca_cert_bytes: &[u8] = if cfg!(test) {&[]} else { include_bytes!("proxelar.cer")};

let pkey =
PKey::private_key_from_pem(private_key_bytes).expect("Failed to parse private key");
Expand Down

0 comments on commit 020a7bc

Please sign in to comment.