Skip to content

Commit ab5c94a

Browse files
committed
Ensure we build if a downstream crate sets --cfg=fuzzing
Downstream crates building fur fuzzing will usually set `--cfg=fuzzing` as a side-effect of the Rust fuzzing tooling. Thus, we should ensure we build without failure in such cases.
1 parent ba342de commit ab5c94a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lightning/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ extern crate bitcoin;
6767
extern crate core;
6868

6969
#[cfg(any(test, feature = "_test_utils"))] extern crate hex;
70-
#[cfg(any(test, fuzzing, feature = "_test_utils"))] extern crate regex;
70+
#[cfg(any(test, feature = "_test_utils"))] extern crate regex;
7171

7272
#[cfg(not(feature = "std"))] extern crate core2;
7373

lightning/src/util/test_utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ use bitcoin::secp256k1::{SecretKey, PublicKey, Secp256k1, ecdsa::Signature, Scal
4545
use bitcoin::secp256k1::ecdh::SharedSecret;
4646
use bitcoin::secp256k1::ecdsa::RecoverableSignature;
4747

48+
#[cfg(any(test, feature = "_test_utils"))]
4849
use regex;
4950

5051
use crate::io;
@@ -738,6 +739,7 @@ impl TestLogger {
738739
/// 1. belong to the specified module and
739740
/// 2. match the given regex pattern.
740741
/// Assert that the number of occurrences equals the given `count`
742+
#[cfg(any(test, feature = "_test_utils"))]
741743
pub fn assert_log_regex(&self, module: &str, pattern: regex::Regex, count: usize) {
742744
let log_entries = self.lines.lock().unwrap();
743745
let l: usize = log_entries.iter().filter(|&(&(ref m, ref l), _c)| {

0 commit comments

Comments
 (0)