Skip to content

Commit f6ba30c

Browse files
Fix deserialization errors by using a different serialization method
1 parent bee8826 commit f6ba30c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stack-graphs/src/storage.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ impl SQLiteWriter {
283283
&file.to_string_lossy(),
284284
tag,
285285
error,
286-
&rmp_serde::to_vec(&graph)?,
286+
&rmp_serde::to_vec_named(&graph)?,
287287
))?;
288288
Ok(())
289289
}
@@ -323,7 +323,7 @@ impl SQLiteWriter {
323323
let mut stmt =
324324
conn.prepare_cached("INSERT INTO graphs (file, tag, value) VALUES (?, ?, ?)")?;
325325
let graph = serde::StackGraph::from_graph_filter(graph, &FileFilter(file));
326-
stmt.execute((file_str, tag, &rmp_serde::to_vec(&graph)?))?;
326+
stmt.execute((file_str, tag, &rmp_serde::to_vec_named(&graph)?))?;
327327
Ok(())
328328
}
329329

@@ -364,7 +364,7 @@ impl SQLiteWriter {
364364
);
365365
let symbol_stack = path.symbol_stack_precondition.storage_key(graph, partials);
366366
let path = serde::PartialPath::from_partial_path(graph, partials, path);
367-
root_stmt.execute((file_str, symbol_stack, &rmp_serde::to_vec(&path)?))?;
367+
root_stmt.execute((file_str, symbol_stack, &rmp_serde::to_vec_named(&path)?))?;
368368
root_path_count += 1;
369369
} else if start_node.is_in_file(file) {
370370
copious_debugging!(
@@ -375,7 +375,7 @@ impl SQLiteWriter {
375375
node_stmt.execute((
376376
file_str,
377377
path.start_node.local_id,
378-
&rmp_serde::to_vec(&path)?,
378+
&rmp_serde::to_vec_named(&path)?,
379379
))?;
380380
node_path_count += 1;
381381
} else {

0 commit comments

Comments
 (0)