Skip to content

Commit

Permalink
Improve order of iterating over composite type members
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrDeveloper committed Nov 8, 2024
1 parent 0ba8b76 commit 6f6860c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
31 changes: 27 additions & 4 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/gitql-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ categories = ["command-line-utilities"]
gitql-ast = { path = "../gitql-ast", version = "0.26.0" }
chrono = "0.4.38"
dyn-clone = "1.0.17"
indexmap = "2.6.0"
1 change: 1 addition & 0 deletions crates/gitql-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ pub mod object;
pub mod schema;
pub mod signature;
pub mod values;
pub use indexmap;
4 changes: 3 additions & 1 deletion crates/gitql-core/src/values/composite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ use std::collections::HashMap;
use gitql_ast::types::base::DataType;
use gitql_ast::types::composite::CompositeType;

use indexmap::IndexMap;

use super::base::Value;

#[derive(Clone)]
pub struct CompositeValue {
pub name: String,
pub members: HashMap<String, Box<dyn Value>>,
pub members: IndexMap<String, Box<dyn Value>>,
}

impl Value for CompositeValue {
Expand Down

0 comments on commit 6f6860c

Please sign in to comment.