mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-20 00:40:18 +00:00
rearrange configuration to be closer to where it's consumed
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
use crate::config::{EntryDeclaration, MatrixConfiguration};
|
||||
use crate::config::EntryDeclaration;
|
||||
use crate::context::Context;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::BTreeMap;
|
||||
use std::rc::Rc;
|
||||
|
||||
#[derive(Serialize, Deserialize, Default, Clone)]
|
||||
pub struct MatrixConfiguration {
|
||||
#[serde(default)]
|
||||
pub entry: EntryDeclaration,
|
||||
#[serde(default)]
|
||||
pub values: BTreeMap<String, Vec<String>>,
|
||||
}
|
||||
|
||||
fn build_matrix(input: &BTreeMap<String, Vec<String>>) -> Vec<BTreeMap<String, String>> {
|
||||
let items: Vec<(String, Vec<String>)> = input.clone().into_iter().collect();
|
||||
let mut result: Vec<BTreeMap<String, String>> = vec![BTreeMap::new()];
|
||||
|
||||
Reference in New Issue
Block a user