From 6fc06c996f0fdf84a41a8434507aba2af7ec883c Mon Sep 17 00:00:00 2001 From: Freddie Ridell Date: Wed, 18 Mar 2026 18:10:47 +0000 Subject: [PATCH] Add allow(dead_code) and cfg(test) annotations --- crates/bough-cli/src/config.rs | 1 + crates/bough-cli/src/lib.rs | 2 ++ crates/bough-corpus-tests/src/lib.rs | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/crates/bough-cli/src/config.rs b/crates/bough-cli/src/config.rs index bbe20fe0..ce52398b 100644 --- a/crates/bough-cli/src/config.rs +++ b/crates/bough-cli/src/config.rs @@ -172,6 +172,7 @@ pub enum Step { workspace_id: String, /// Hash of the mutation to revert. #[facet(args::positional)] + #[allow(dead_code)] mutation_hash: String, }, diff --git a/crates/bough-cli/src/lib.rs b/crates/bough-cli/src/lib.rs index 0f9101f6..80ea0033 100644 --- a/crates/bough-cli/src/lib.rs +++ b/crates/bough-cli/src/lib.rs @@ -1,2 +1,4 @@ +#[allow(dead_code)] pub mod config; +#[allow(dead_code)] pub mod render; diff --git a/crates/bough-corpus-tests/src/lib.rs b/crates/bough-corpus-tests/src/lib.rs index 3f7fbb24..33dc3a1c 100644 --- a/crates/bough-corpus-tests/src/lib.rs +++ b/crates/bough-corpus-tests/src/lib.rs @@ -1,9 +1,15 @@ +#[cfg(test)] use bough_core::mutant::TwigMutantsIter; +#[cfg(test)] use bough_core::{Base, LanguageId, Mutation, MutationIter, Twig, TwigsIterBuilder}; +#[cfg(test)] use sha2::{Digest, Sha256}; +#[cfg(test)] use std::collections::HashSet; +#[cfg(test)] use std::path::{Path, PathBuf}; +#[cfg(test)] fn content_hash(content: &str) -> String { let mut hasher = Sha256::new(); hasher.update(content.as_bytes()); @@ -11,6 +17,7 @@ fn content_hash(content: &str) -> String { hex::encode(&result[..6]) } +#[cfg(test)] fn corpus_test_runner(case_dir: &str, lang: LanguageId, ext: &str) { let case_path = Path::new(case_dir); let base_file = case_path.join(format!("base.{ext}")); -- knotmirror 0.0.1