Skip to content

Commit 41ff135

Browse files
committed
tasks: allow user to not set all configs
1 parent da9739f commit 41ff135

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)