Skip to content

Commit b56374b

Browse files
committed
clippy
1 parent e061e9a commit b56374b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,11 @@ fn migrate_declaration(value: &mut serde_json::Value) {
268268
// top-level nodes). In v2 they are `Vec<Symbol>` where each Symbol
269269
// groups declarations by name — the same structure as the top-level
270270
// Document.symbols. Convert them here.
271-
if let Some(serde_json::Value::Object(def)) = obj.get_mut("def") {
272-
if let Some(serde_json::Value::Array(elements)) = def.remove("elements") {
273-
let symbols = v1_nodes_to_symbols(elements);
274-
def.insert("elements".to_string(), symbols);
275-
}
271+
if let Some(serde_json::Value::Object(def)) = obj.get_mut("def")
272+
&& let Some(serde_json::Value::Array(elements)) = def.remove("elements")
273+
{
274+
let symbols = v1_nodes_to_symbols(elements);
275+
def.insert("elements".to_string(), symbols);
276276
}
277277

278278
// v1 TsTypeDef used variant-name content keys (e.g. "keyword": "string"),

0 commit comments

Comments
 (0)