diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-02-09 18:17:14 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-02-20 18:58:23 -0500 |
| commit | 42904b02191a6ee34373d04cf439a89badfae508 (patch) | |
| tree | cbb847a6fca4f38393b68ddc8dd726d9f7d4d9a9 /compiler/rustc_query_system/src | |
| parent | 75614c06ee2212bf171a301e6d6e0a2f5429126f (diff) | |
| download | rust-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.rs | 20 |
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<_, _> = |
