summaryrefslogtreecommitdiff
path: root/src/object.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/object.rs')
-rw-r--r--src/object.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/object.rs b/src/object.rs
index aa5f434..90a06f4 100644
--- a/src/object.rs
+++ b/src/object.rs
@@ -1,14 +1,14 @@
-use std::collections::HashMap;
-use std::fs;
+use crate::utilities::deserialize_kv_with_message;
use crate::{create_path_or_die, die};
+use derive_is_enum_variant::is_enum_variant;
use flate2::read::{ZlibDecoder, ZlibEncoder};
+use flate2::Compression;
+use indexmap::IndexMap;
+use sha1::{Digest, Sha1};
+use std::fs;
use std::fs::File;
use std::io::{BufReader, Read, Write};
use std::path::PathBuf;
-use derive_is_enum_variant::is_enum_variant;
-use flate2::Compression;
-use sha1::{Digest, Sha1};
-use crate::utilities::deserialize_kv_with_message;
#[derive(is_enum_variant)]
pub enum GitObjectType {
@@ -120,14 +120,14 @@ impl GitObject {
}
pub struct GitCommit {
- header: HashMap<String, String>,
+ header: IndexMap<String, String>,
message: String,
}
impl GitCommit {
pub fn new() -> Self {
Self {
- header: HashMap::new(),
+ header: IndexMap::new(),
message: String::new(),
}
}