use std::sync::Arc;
use cargo_gamma_engine::ops::collect::into_definitions;
pub use cargo_gamma_engine::ops::collect::{
Candidate, Defaults, Shape, check_stated, check_stated_and_collect_with, collect, collect_in, collect_with,
};
use crate::model::Mutant;
use crate::parse::SourceFile;
#[must_use]
pub fn into_mutants(file: &SourceFile, package: &str, candidates: Vec<Candidate>) -> Vec<Mutant> {
let package = Arc::from(package);
into_definitions(file, candidates)
.into_iter()
.map(|definition| Mutant::from_definition(definition, Arc::clone(&package)))
.collect()
}