skip target if it already exists
This commit is contained in:
parent
8d05da5209
commit
9a96f4dfb6
2 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
use core::panic;
|
use core::panic;
|
||||||
use std::{collections::HashMap, env::args, fs::read_to_string, process::exit};
|
use std::{collections::HashMap, fs::read_to_string, process::exit};
|
||||||
|
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
|
||||||
|
@ -56,6 +56,9 @@ fn main() {
|
||||||
let mut target_list: TargetList = TargetList(HashMap::new());
|
let mut target_list: TargetList = TargetList(HashMap::new());
|
||||||
for order in &inheritance_order {
|
for order in &inheritance_order {
|
||||||
for name in order.into_iter().rev() {
|
for name in order.into_iter().rev() {
|
||||||
|
if let Some(_) = target_list.0.get(name as &str) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let opts = target_option_list.0.get(name as &str).unwrap();
|
let opts = target_option_list.0.get(name as &str).unwrap();
|
||||||
let deser = deser_target_list.get(name as &str).unwrap();
|
let deser = deser_target_list.get(name as &str).unwrap();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::deser::*;
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
Loading…
Reference in a new issue