diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-19 11:06:42 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-19 11:07:07 +0200 |
commit | ed42e65627f3283f0e002490fbcb652649fd3afc (patch) | |
tree | 8eba438f2b234714bcf00c5d4e9c9a836ff97baf /src/parser.rs | |
parent | f98836b85ce71157adaa10c9d5ef5c0ee527e67a (diff) | |
download | markdown-rs-ed42e65627f3283f0e002490fbcb652649fd3afc.tar.gz markdown-rs-ed42e65627f3283f0e002490fbcb652649fd3afc.tar.bz2 markdown-rs-ed42e65627f3283f0e002490fbcb652649fd3afc.zip |
Replace use of `HashSet` with `vec`
Diffstat (limited to 'src/parser.rs')
-rw-r--r-- | src/parser.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parser.rs b/src/parser.rs index 409e812..3361baf 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -4,7 +4,6 @@ use crate::content::document::document; use crate::tokenizer::{Code, Event, Point}; use crate::util::codes::parse as parse_codes; use crate::{Constructs, Options}; -use std::collections::HashSet; /// Information needed, in all content types, when parsing markdown. /// @@ -16,7 +15,7 @@ pub struct ParseState { /// List of codes. pub codes: Vec<Code>, /// Set of defined identifiers. - pub definitions: HashSet<String>, + pub definitions: Vec<String>, } /// Turn a string of markdown into events. @@ -26,7 +25,7 @@ pub fn parse(value: &str, options: &Options) -> (Vec<Event>, ParseState) { let mut parse_state = ParseState { constructs: options.constructs.clone(), codes: parse_codes(value), - definitions: HashSet::new(), + definitions: vec![], }; let events = document( |