mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 07:07:07 +03:00
use index map in imports module
This commit is contained in:
parent
5d2136b518
commit
ae6ee186ad
@ -25,6 +25,10 @@ version = "1.0.6"
|
||||
path = "../grammar"
|
||||
version = "1.0.6"
|
||||
|
||||
[dependencies.indexmap]
|
||||
version = "1.6.0"
|
||||
features = ["serde-1"]
|
||||
|
||||
[dependencies.thiserror]
|
||||
version = "1.0"
|
||||
|
||||
|
@ -17,10 +17,8 @@
|
||||
use crate::errors::ImportParserError;
|
||||
use leo_ast::{Package, Program};
|
||||
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
env::current_dir,
|
||||
};
|
||||
use indexmap::{IndexMap, IndexSet};
|
||||
use std::env::current_dir;
|
||||
|
||||
/// Stores imported packages.
|
||||
///
|
||||
@ -28,8 +26,8 @@ use std::{
|
||||
/// directory, foreign in the imports directory, or part of the core package list.
|
||||
#[derive(Clone, Default)]
|
||||
pub struct ImportParser {
|
||||
imports: HashMap<String, Program>,
|
||||
core_packages: HashSet<Package>,
|
||||
imports: IndexMap<String, Program>,
|
||||
core_packages: IndexSet<Package>,
|
||||
}
|
||||
|
||||
impl ImportParser {
|
||||
|
Loading…
Reference in New Issue
Block a user