aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map.rs8
-rw-r--r--src/value.rs1
2 files changed, 4 insertions, 5 deletions
diff --git a/src/map.rs b/src/map.rs
index 054961d..b6e00b0 100644
--- a/src/map.rs
+++ b/src/map.rs
@@ -14,12 +14,12 @@
//! [`BTreeMap`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html
//! [`LinkedHashMap`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
+use crate::value::Value;
use serde::{de, ser};
+use std::borrow::Borrow;
use std::fmt::{self, Debug};
-use crate::value::Value;
use std::hash::Hash;
use std::iter::FromIterator;
-use std::borrow::Borrow;
use std::ops;
#[cfg(not(feature = "preserve_order"))]
@@ -144,10 +144,10 @@ impl Map<String, Value> {
where
S: Into<String>,
{
- #[cfg(not(feature = "preserve_order"))]
- use std::collections::btree_map::Entry as EntryImpl;
#[cfg(feature = "preserve_order")]
use linked_hash_map::Entry as EntryImpl;
+ #[cfg(not(feature = "preserve_order"))]
+ use std::collections::btree_map::Entry as EntryImpl;
match self.map.entry(key.into()) {
EntryImpl::Vacant(vacant) => Entry::Vacant(VacantEntry { vacant: vacant }),
diff --git a/src/value.rs b/src/value.rs
index 8f2c6c6..00ce703 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -16,7 +16,6 @@ pub use crate::datetime::{Datetime, DatetimeParseError};
pub use crate::map::Map;
-
/// Representation of a TOML value.
#[derive(PartialEq, Clone, Debug)]
pub enum Value {