Skip to content

Commit

Permalink
Merge pull request #8 from GrayJack/hashlink
Browse files Browse the repository at this point in the history
deps: Use hashlink instead of linked-hash-map
  • Loading branch information
kinnison committed Apr 3, 2024
2 parents 6f8fb4f + d3c0248 commit e7bb268
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
19 changes: 11 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion marked-yaml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ serde-path = ["serde", "dep:serde_path_to_error"]
[dependencies]
doc-comment = "0.3"
yaml-rust = { version = "0.8", package = "yaml-rust2" }
linked-hash-map = "0.5.6"
hashlink = "0.9.0"
serde = { version = "1.0.194", optional = true, features = ["derive"] }
serde_path_to_error = { version = "0.1.16", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion marked-yaml/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use crate::types::*;

use linked_hash_map::Entry;
use hashlink::linked_hash_map::Entry;
use yaml_rust::parser::{Event, MarkedEventReceiver, Parser};
use yaml_rust::scanner::Marker as YamlMarker;
use yaml_rust::scanner::ScanError;
Expand Down
2 changes: 1 addition & 1 deletion marked-yaml/src/spanned_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ impl<'de> Deserializer<'de> for MarkedScalarNodeDeserializer<'de> {

// -------------------------------------------------------------------------------

type MappingValueSeq<'de> = linked_hash_map::Iter<'de, MarkedScalarNode, Node>;
type MappingValueSeq<'de> = hashlink::linked_hash_map::Iter<'de, MarkedScalarNode, Node>;
struct MappingAccess<'de> {
items: Peekable<MappingValueSeq<'de>>,
}
Expand Down
8 changes: 3 additions & 5 deletions marked-yaml/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
//!

use doc_comment::doc_comment;
use linked_hash_map::LinkedHashMap;
use hashlink::LinkedHashMap;
use std::borrow::{Borrow, Cow};
use std::convert::TryFrom;
use std::fmt::{self, Display};
use std::hash::{Hash, Hasher};
use std::iter::FromIterator;
use std::ops::{Deref, DerefMut};
use yaml_rust::Yaml as YamlNode;

Expand Down Expand Up @@ -968,7 +966,7 @@ impl MarkedSequenceNode {
///
/// ```
/// # use marked_yaml::types::*;
/// # use linked_hash_map::LinkedHashMap;
/// # use hashlink::LinkedHashMap;
/// # let map: LinkedHashMap<MarkedScalarNode, Node> = LinkedHashMap::new();
/// let seq: MarkedSequenceNode = vec![map].into_iter().collect();
/// assert!(seq.get_mapping(0).is_some());
Expand Down Expand Up @@ -1058,7 +1056,7 @@ impl MarkedMappingNode {
///
/// ```
/// # use marked_yaml::types::*;
/// # use linked_hash_map::LinkedHashMap;
/// # use hashlink::LinkedHashMap;
/// let node = MarkedMappingNode::new(Span::new_blank(), LinkedHashMap::new());
/// ```
pub fn new(span: Span, value: MappingHash) -> Self {
Expand Down

0 comments on commit e7bb268

Please sign in to comment.