Skip to content

Commit fa181ab

Browse files
committed
A comment to help ProjectJsonData stay backwards-compatible
Makes clear to future editors of this code that they should add #[serde(default)] to new fields.
1 parent 967277d commit fa181ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/project-model/src/project_json.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,8 @@ pub struct ProjectJsonData {
383383
crates: Vec<CrateData>,
384384
#[serde(default)]
385385
runnables: Vec<RunnableData>,
386+
//
387+
// New fields should be Option or #[serde(default)]. This applies to most of this datastructure.
386388
}
387389

388390
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Default)]

0 commit comments

Comments
 (0)