Skip to content

Commit

Permalink
Rename the map visitor to MapVisitor
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jun 24, 2016
1 parent 147c3ee commit 50e72e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions json/src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ pub type MapIntoIter<K, V> = btree_map::IntoIter<K, V>;
pub type MapIntoIter<K, V> = linked_hash_map::IntoIter<K, V>;

#[cfg(not(feature = "preserve_order"))]
type Visitor<K, T> = de::impls::BTreeMapVisitor<K, T>;
type MapVisitor<K, T> = de::impls::BTreeMapVisitor<K, T>;
#[cfg(feature = "preserve_order")]
type Visitor<K, T> = linked_hash_map::serde::LinkedHashMapVisitor<K, T>;
type MapVisitor<K, T> = linked_hash_map::serde::LinkedHashMapVisitor<K, T>;

/// Represents a JSON value
#[derive(Clone, PartialEq)]
Expand Down Expand Up @@ -453,7 +453,7 @@ impl de::Deserialize for Value {
fn visit_map<V>(&mut self, visitor: V) -> Result<Value, V::Error>
where V: de::MapVisitor,
{
let values = try!(Visitor::new().visit_map(visitor));
let values = try!(MapVisitor::new().visit_map(visitor));
Ok(Value::Object(values))
}
}
Expand Down

0 comments on commit 50e72e6

Please sign in to comment.