settings: Use a derive macro for refine (#38451)
When we refactored settings to not pass JSON blobs around, we ended up needing to write *a lot* of code that just merged things (like json merge used to do). Use a derive macro to prevent typos in this logic. Release Notes: - N/A
This commit is contained in:
@@ -269,15 +269,15 @@ async fn test_language_for_file_with_custom_file_types(cx: &mut TestAppContext)
|
||||
cx.update(|cx| {
|
||||
init_settings(cx, |settings| {
|
||||
settings.file_types.extend([
|
||||
("TypeScript".into(), vec!["js".into()]),
|
||||
("TypeScript".into(), vec!["js".into()].into()),
|
||||
(
|
||||
"JavaScript".into(),
|
||||
vec!["*longer.ts".into(), "ecmascript".into()],
|
||||
vec!["*longer.ts".into(), "ecmascript".into()].into(),
|
||||
),
|
||||
("C++".into(), vec!["c".into(), "*.dev".into()]),
|
||||
("C++".into(), vec!["c".into(), "*.dev".into()].into()),
|
||||
(
|
||||
"Dockerfile".into(),
|
||||
vec!["Dockerfile".into(), "Dockerfile.*".into()],
|
||||
vec!["Dockerfile".into(), "Dockerfile.*".into()].into(),
|
||||
),
|
||||
]);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user