about summary refs log tree commit diff
path: root/compiler/rustc_query_system/src
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2022-02-09 18:17:14 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2022-02-20 18:58:23 -0500
commit42904b02191a6ee34373d04cf439a89badfae508 (patch)
treecbb847a6fca4f38393b68ddc8dd726d9f7d4d9a9 /compiler/rustc_query_system/src
parent75614c06ee2212bf171a301e6d6e0a2f5429126f (diff)
downloadrust-42904b02191a6ee34373d04cf439a89badfae508.tar.gz
rust-42904b02191a6ee34373d04cf439a89badfae508.zip
Delete Decoder::read_seq
Diffstat (limited to 'compiler/rustc_query_system/src')
-rw-r--r--compiler/rustc_query_system/src/dep_graph/serialized.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/serialized.rs b/compiler/rustc_query_system/src/dep_graph/serialized.rs
index 2ac5d5431a5..9778f77384c 100644
--- a/compiler/rustc_query_system/src/dep_graph/serialized.rs
+++ b/compiler/rustc_query_system/src/dep_graph/serialized.rs
@@ -130,16 +130,16 @@ impl<'a, K: DepKind + Decodable<opaque::Decoder<'a>>> Decodable<opaque::Decoder<
             let _i: SerializedDepNodeIndex = fingerprints.push(fingerprint);
             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 = Decodable::decode(d);
-                    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);
-            })
+            // Deserialize edges -- sequence of DepNodeIndex
+            let len = d.read_usize();
+            let start = edge_list_data.len().try_into().unwrap();
+            for _ in 0..len {
+                let edge = Decodable::decode(d);
+                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);
         }
 
         let index: FxHashMap<_, _> =