aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2019-05-08 17:45:39 -0700
committerEric Huss <eric@huss.org>2019-05-08 17:45:39 -0700
commit0fca4dd2d30a2044af454cf55211e67cf76f333c (patch)
tree6a41d4f9ce2fba536d02325fff70076f00910a8d /src
parent6c162e6562c3e432bf04c82a3d1d789d80761a86 (diff)
downloadmilf-rs-0fca4dd2d30a2044af454cf55211e67cf76f333c.tar.gz
milf-rs-0fca4dd2d30a2044af454cf55211e67cf76f333c.zip
cargo fmt
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 {