To save order of output csv column order #165
This commit is contained in:
@@ -158,8 +158,8 @@ pub fn insert(
|
||||
if exist_detail {
|
||||
profile_converter.insert("%Details%".to_string(), detect_info.detail.to_owned());
|
||||
}
|
||||
let mut tmp_converted_info: HashMap<String, String> = HashMap::new();
|
||||
for (k, v) in detect_info.ext_field.iter() {
|
||||
let mut tmp_converted_info: LinkedHashMap<String, String> = LinkedHashMap::new();
|
||||
for (k, v) in &detect_info.ext_field {
|
||||
let converted_reserve_info = convert_profile_reserved_info(v, profile_converter);
|
||||
tmp_converted_info.insert(
|
||||
k.to_owned(),
|
||||
|
||||
@@ -326,12 +326,12 @@ impl CountStrategy for FieldStrategy {
|
||||
}
|
||||
|
||||
let record_value = &datas[idx as usize].field_record_value;
|
||||
let key_val = self.value_2_cnt.get_mut(record_value);
|
||||
let key_val = self.value_2_cnt.get_key_value_mut(record_value);
|
||||
if key_val.is_none() {
|
||||
return;
|
||||
}
|
||||
|
||||
let val: &mut i64 = key_val.unwrap();
|
||||
let val: &mut i64 = key_val.unwrap().1;
|
||||
if val <= &mut 1 {
|
||||
// 0になる場合はキー自体削除する
|
||||
self.value_2_cnt.remove(record_value);
|
||||
|
||||
Reference in New Issue
Block a user