pub fn remove_overlap(
    target: impl IntoIterator<Item = impl std::convert::TryInto<SampleHash>>,
    blacklist: impl IntoIterator<Item = ContentHash>,
) -> HashSet<SampleHash> {
    let target: HashSet<SampleHash> = SampleHash::uniquify(target);
    let blacklist: HashSet<SampleHash> = blacklist
        .into_iter()
        .map(|x| x.into_iter())
        .flat_map(|x| x)
        .collect();
    target.difference(&blacklist).cloned().collect()
}
/// remove overlap from target with blacklist
///
/// # Example
///
/// ```
/// use iocutil::prelude::*;
/// use iocutil::contenthash::remove_overlap;
///
/// let c = ContentHash::default();
///
/// let target = vec!["9fbdc5eca123e81571e8966b9b4e4a1e".to_owned(), c.sha256.as_ref().to_string()];
/// let blacklist = vec![c];
///
/// let ro = remove_overlap(target, blacklist);
/// assert_eq!(ro.len(), 1);
/// assert!(ro.contains(&sample!("9fbdc5eca123e81571e8966b9b4e4a1e")));
/// ```
remove overlap from target with blacklist
remove overlap from target with blacklist
pub fn remove_overlap(
    target: impl IntoIterator<Item = impl std::convert::TryInto<SampleHash>>,
    blacklist: impl IntoIterator<Item = ContentHash>,
) -> HashSet<SampleHash> {
    let target: HashSet<SampleHash> = SampleHash::uniquify(target);
    let blacklist: HashSet<SampleHash> = blacklist
        .into_iter()
        .map(|x| x.into_iter())
        .flat_map(|x| x)
        .collect();
    target.difference(&blacklist).cloned().collect()
}
pub fn remove_overlap ( target : impl IntoIterator < Item = impl std :: convert :: TryInto < SampleHash > > , blacklist : impl IntoIterator < Item = ContentHash > , ) -> HashSet < SampleHash > { let target : HashSet < SampleHash > = SampleHash :: uniquify ( target ) ; let blacklist : HashSet < SampleHash > = blacklist . into_iter ( ) . map ( | x | x . into_iter ( ) ) . flat_map ( | x | x ) . collect ( ) ; target . difference ( & blacklist ) . cloned ( ) . collect ( ) }
remove overlap from target with blacklist
remove overlap from target with blacklist
target
impl IntoIterator<Item = impl std::convert::TryInto<SampleHash>>
blacklist
impl IntoIterator<Item = ContentHash>
example
```
use iocutil::prelude::*;
use iocutil::contenthash::remove_overlap.

let c = ContentHash::default().




` ` ` use iocutil :: prelude :: * ; use iocutil :: contenthash :: remove_overlap . let c = ContentHash :: default () .