]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_query_system/src/dep_graph/serialized.rs
Delete Decoder::read_struct_field
[rust.git] / compiler / rustc_query_system / src / dep_graph / serialized.rs
index 8c85605c0301304e2dc4c85d6ef8d0d4e144ea9c..29db5a9878e028b9668a554d5c38e5a064f9b0aa 100644 (file)
@@ -122,25 +122,23 @@ fn decode(d: &mut opaque::Decoder<'a>) -> SerializedDepGraph<K> {
         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);
             })
         }