@@ -115,7 +115,7 @@ fn load_dep_graph(sess: &Session) -> LoadResult<(Arc<SerializedDepGraph>, WorkPr
115
115
116
116
if let LoadResult :: Ok { data : ( work_products_data, start_pos) } = load_result {
117
117
// Decode the list of work_products
118
- let Some ( mut work_product_decoder) =
118
+ let Ok ( mut work_product_decoder) =
119
119
MemDecoder :: new ( & work_products_data[ ..] , start_pos)
120
120
else {
121
121
sess. dcx ( ) . emit_warn ( errors:: CorruptFile { path : & work_products_path } ) ;
@@ -150,7 +150,7 @@ fn load_dep_graph(sess: &Session) -> LoadResult<(Arc<SerializedDepGraph>, WorkPr
150
150
LoadResult :: DataOutOfDate => LoadResult :: DataOutOfDate ,
151
151
LoadResult :: LoadDepGraph ( path, err) => LoadResult :: LoadDepGraph ( path, err) ,
152
152
LoadResult :: Ok { data : ( bytes, start_pos) } => {
153
- let Some ( mut decoder) = MemDecoder :: new ( & bytes, start_pos) else {
153
+ let Ok ( mut decoder) = MemDecoder :: new ( & bytes, start_pos) else {
154
154
sess. dcx ( ) . emit_warn ( errors:: CorruptFile { path : & path } ) ;
155
155
return LoadResult :: DataOutOfDate ;
156
156
} ;
@@ -192,7 +192,7 @@ pub fn load_query_result_cache(sess: &Session) -> Option<OnDiskCache<'_>> {
192
192
let path = query_cache_path ( sess) ;
193
193
match load_data ( & path, sess) {
194
194
LoadResult :: Ok { data : ( bytes, start_pos) } => {
195
- let cache = OnDiskCache :: new ( sess, bytes, start_pos) . unwrap_or_else ( || {
195
+ let cache = OnDiskCache :: new ( sess, bytes, start_pos) . unwrap_or_else ( |( ) | {
196
196
sess. dcx ( ) . emit_warn ( errors:: CorruptFile { path : & path } ) ;
197
197
OnDiskCache :: new_empty ( sess. source_map ( ) )
198
198
} ) ;
0 commit comments