Fix remote server (ssh) crash when editing json (#33818)

Closes #33807

Release Notes:

- (Preview Only) Fixes a remote server (ssh) crash when editing json
files

---------

Co-authored-by: Cole <cole@zed.dev>
This commit is contained in:
Michael Sloan 2025-07-02 18:21:39 -06:00 committed by GitHub
parent 77c4530e12
commit 32d058d95e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 27 additions and 38 deletions

View file

@ -321,7 +321,7 @@ inventory::submit! {
let language_settings_content_ref = generator
.subschema_for::<LanguageSettingsContent>()
.to_value();
let schema = json_schema!({
replace_subschema::<LanguageToSettingsMap>(generator, || json_schema!({
"type": "object",
"properties": params
.language_names
@ -333,8 +333,7 @@ inventory::submit! {
)
})
.collect::<serde_json::Map<_, _>>()
});
replace_subschema::<LanguageToSettingsMap>(generator, schema)
}))
}
}
}