# remove_if_contained

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-dynamic-data/kernel/function-remove_if_contained/

**function** · [`ferroui-dynamic-data`](/docs/0.5.0/api/ferroui-dynamic-data/) · v0.5.0

```rust
fn remove_if_contained<K: Eq + Hash, V>(source: &mut std::collections::HashMap<K, V>, key: &K) -> bool
```

Removes `key` from `source`; whether it was there (`RemoveIfContained`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/kernel/option_extensions.rs#L99)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
