Skip to content

Commit 4eb8e3b

Browse files
committed
Merge #28: tasks: allow user to not set all configs
41ff135 tasks: allow user to not set all configs (Nick Johnson) Pull request description: Been testing out integration and realized it's a pain to have to set all un-used config settings to empty lists. Example from rust-psbt where I don't want to set `exact_features` and `features_with_no_std`: ``` features_with_std = ["rand", "serde", "base64", "miniscript"] features_without_std = ["serde", "base64"] exact_features = [] features_with_no_std = [] ``` ACKs for top commit: tcharding: ACK 41ff135 Tree-SHA512: d63d7bdbdd45bfbd6d4453994ecf4de934cc7c931d0e6e426382a7aa155f97a175e7b47d52307605c70fcaaf1da386c8fb51d0764c61dd7304aed525dda3898f
2 parents da9739f + 41ff135 commit 4eb8e3b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

tasks/src/lint.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ use crate::quiet_cmd;
66
use crate::toolchain::{check_toolchain, Toolchain};
77

88
/// Lint configuration loaded from contrib/rbmt.toml.
9-
#[derive(Debug, serde::Deserialize)]
9+
#[derive(Debug, serde::Deserialize, Default)]
10+
#[serde(default)]
1011
struct Config {
1112
lint: LintConfig,
1213
}
1314

1415
/// Lint-specific configuration.
15-
#[derive(Debug, serde::Deserialize)]
16+
#[derive(Debug, serde::Deserialize, Default)]
17+
#[serde(default)]
1618
struct LintConfig {
1719
/// List of crate names that are allowed to have duplicate versions.
1820
allowed_duplicates: Vec<String>,

tasks/src/test.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ use std::path::Path;
88
use xshell::Shell;
99

1010
/// Test configuration loaded from contrib/rbmt.toml.
11-
#[derive(Debug, Deserialize)]
11+
#[derive(Debug, Deserialize, Default)]
12+
#[serde(default)]
1213
struct Config {
1314
test: TestConfig,
1415
}
1516

1617
/// Test-specific configuration.
17-
#[derive(Debug, Deserialize)]
18+
#[derive(Debug, Deserialize, Default)]
19+
#[serde(default)]
1820
struct TestConfig {
1921
/// Examples to run with the format "name:feature1 feature2".
2022
///

0 commit comments

Comments
 (0)