Skip to content

Commit

Permalink
Merge pull request #22 from molnett/preserve-order
Browse files Browse the repository at this point in the history
fix: preserve order of env vars and secrets when (de)serializing
  • Loading branch information
tmlye authored Mar 20, 2024
2 parents 7e538c2 + f90a8d6 commit b107277
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 32 deletions.
59 changes: 31 additions & 28 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ dialoguer = { version = "0.10.4", features = ["fuzzy-select"] }
difference = "2.0"
dirs-next = "2.0.0"
home = "0.5.5"
indexmap = { version = "2.2.5", features = ["serde"] }
oauth2 = "4.4.2"
once_cell = "1.18.0"
reqwest = { version = "0.11.20", features = ["json"] }
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.105"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = { version = "1.0.114", features = ["preserve_order"] }
serde_yaml = "0.9.25"
tabled = "0.14.0"
term = "0.7.0"
Expand Down
4 changes: 2 additions & 2 deletions src/api/types.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::fmt::{Display, Formatter, Result};
use std::collections::HashMap;
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use tabled::Tabled;

Expand Down Expand Up @@ -47,7 +47,7 @@ pub struct Secret {
}

#[derive(Clone, Debug, Default, Deserialize, Serialize, PartialEq)]
pub struct DisplayHashMap(HashMap<String, String>);
pub struct DisplayHashMap(IndexMap<String, String>);

#[derive(Clone, Debug, Default, Deserialize, Serialize, PartialEq)]
pub struct DisplayOption<T>(Option<T>);
Expand Down

0 comments on commit b107277

Please sign in to comment.