Unnamed repository; edit this file 'description' to name the repository.
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.
Cormac Relf 4 months ago
parent 967277d · commit fa181ab
-rw-r--r--crates/project-model/src/project_json.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/project-model/src/project_json.rs b/crates/project-model/src/project_json.rs
index cd13a208a4..e3a4feec8d 100644
--- a/crates/project-model/src/project_json.rs
+++ b/crates/project-model/src/project_json.rs
@@ -383,6 +383,8 @@ pub struct ProjectJsonData {
crates: Vec<CrateData>,
#[serde(default)]
runnables: Vec<RunnableData>,
+ //
+ // New fields should be Option or #[serde(default)]. This applies to most of this datastructure.
}
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Default)]