Skip to content

Commit

Permalink
Format remove_entry cfg with rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Sep 30, 2020
1 parent 455bc43 commit 7778dfd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,22 @@ impl Map<String, Value> {
{
#[cfg(any(feature = "preserve_order", not(no_btreemap_remove_entry)))]
return self.map.remove_entry(key);
#[cfg(all(not(feature = "preserve_order"), no_btreemap_remove_entry, not(no_btreemap_get_key_value)))]
#[cfg(all(
not(feature = "preserve_order"),
no_btreemap_remove_entry,
not(no_btreemap_get_key_value),
))]
{
let (key, _value) = self.map.get_key_value(key)?;
let key = key.clone();
let value = self.map.remove::<String>(&key)?;
Some((key, value))
}
#[cfg(all(not(feature = "preserve_order"), no_btreemap_remove_entry, no_btreemap_get_key_value))]
#[cfg(all(
not(feature = "preserve_order"),
no_btreemap_remove_entry,
no_btreemap_get_key_value,
))]
{
use std::ops::{Bound, RangeBounds};

Expand Down

0 comments on commit 7778dfd

Please sign in to comment.