about summary refs log tree commit diff
path: root/compiler/rustc_query_system
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2022-02-09 17:26:17 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2022-02-20 18:58:22 -0500
commit19288951e1968abbfa552f6340a693d23e5e0254 (patch)
tree4880421657fa368a6c319b567032e5d9d19dec4e /compiler/rustc_query_system
parentc021ba48a70e69fa681ea6617512ae2028e2677a (diff)
downloadrust-19288951e1968abbfa552f6340a693d23e5e0254.tar.gz
rust-19288951e1968abbfa552f6340a693d23e5e0254.zip
Delete Decoder::read_struct_field
Diffstat (limited to 'compiler/rustc_query_system')
-rw-r--r--compiler/rustc_query_system/src/dep_graph/serialized.rs24
1 files changed, 11 insertions, 13 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/serialized.rs b/compiler/rustc_query_system/src/dep_graph/serialized.rs
index 8c85605c030..29db5a9878e 100644
--- a/compiler/rustc_query_system/src/dep_graph/serialized.rs
+++ b/compiler/rustc_query_system/src/dep_graph/serialized.rs
@@ -122,25 +122,23 @@ impl<'a, K: DepKind + Decodable<opaque::Decoder<'a>>> Decodable<opaque::Decoder<
         let mut edge_list_data = Vec::with_capacity(edge_count);
 
         for _index in 0..node_count {
-            let dep_node: DepNode<K> = d.read_struct_field("node", Decodable::decode);
+            let dep_node: DepNode<K> = Decodable::decode(d);
             let _i: SerializedDepNodeIndex = nodes.push(dep_node);
             debug_assert_eq!(_i.index(), _index);
 
-            let fingerprint: Fingerprint = d.read_struct_field("fingerprint", Decodable::decode);
+            let fingerprint: Fingerprint = Decodable::decode(d);
             let _i: SerializedDepNodeIndex = fingerprints.push(fingerprint);
             debug_assert_eq!(_i.index(), _index);
 
-            d.read_struct_field("edges", |d| {
-                d.read_seq(|d, len| {
-                    let start = edge_list_data.len().try_into().unwrap();
-                    for _ in 0..len {
-                        let edge = d.read_seq_elt(Decodable::decode);
-                        edge_list_data.push(edge);
-                    }
-                    let end = edge_list_data.len().try_into().unwrap();
-                    let _i: SerializedDepNodeIndex = edge_list_indices.push((start, end));
-                    debug_assert_eq!(_i.index(), _index);
-                })
+            d.read_seq(|d, len| {
+                let start = edge_list_data.len().try_into().unwrap();
+                for _ in 0..len {
+                    let edge = d.read_seq_elt(Decodable::decode);
+                    edge_list_data.push(edge);
+                }
+                let end = edge_list_data.len().try_into().unwrap();
+                let _i: SerializedDepNodeIndex = edge_list_indices.push((start, end));
+                debug_assert_eq!(_i.index(), _index);
             })
         }