Skip to content

Commit

Permalink
Pass extra non-captured config.toml fields to DotCargo (BrainiumLLC#62)
Browse files Browse the repository at this point in the history
* Add `DotCargoNet` to `DotCargo`

* remove unecessary into

* switch to a map of extra fields.

* Add serde_json to linux

* switch serde_json::Value with toml::Value

* Revert "Add serde_json to linux"

This reverts commit 06f2bb4.
  • Loading branch information
ArthurKValladares committed Jan 21, 2022
1 parent ecb8869 commit c75c985
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dot_cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::{
};
use serde::{Deserialize, Serialize};
use std::{collections::BTreeMap, fs, io, path::PathBuf};
use toml::Value;

#[derive(Debug)]
pub enum LoadError {
Expand Down Expand Up @@ -104,6 +105,8 @@ impl DotCargoTarget {
pub struct DotCargo {
build: Option<DotCargoBuild>,
target: BTreeMap<String, DotCargoTarget>,
#[serde(flatten)]
extra: BTreeMap<String, Value>,
}

impl DotCargo {
Expand Down

0 comments on commit c75c985

Please sign in to comment.