about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2024-05-21 20:12:07 -0400
committerBen Kimock <kimockb@gmail.com>2024-05-21 20:12:30 -0400
commitc3a606237d9c01e4622b267031596bf632567e6f (patch)
treefdcf8485698540fe24cc40d645b96c21561797a5 /compiler/rustc_incremental/src
parent95150d72465db491f4b04b73545e106462bd003b (diff)
downloadrust-c3a606237d9c01e4622b267031596bf632567e6f.tar.gz
rust-c3a606237d9c01e4622b267031596bf632567e6f.zip
PR feedback
Diffstat (limited to 'compiler/rustc_incremental/src')
-rw-r--r--compiler/rustc_incremental/src/persist/load.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_incremental/src/persist/load.rs b/compiler/rustc_incremental/src/persist/load.rs
index c96d22ce45d..9e6ce066785 100644
--- a/compiler/rustc_incremental/src/persist/load.rs
+++ b/compiler/rustc_incremental/src/persist/load.rs
@@ -115,7 +115,7 @@ fn load_dep_graph(sess: &Session) -> LoadResult<(Arc<SerializedDepGraph>, WorkPr
 
         if let LoadResult::Ok { data: (work_products_data, start_pos) } = load_result {
             // Decode the list of work_products
-            let Some(mut work_product_decoder) =
+            let Ok(mut work_product_decoder) =
                 MemDecoder::new(&work_products_data[..], start_pos)
             else {
                 sess.dcx().emit_warn(errors::CorruptFile { path: &work_products_path });
@@ -150,7 +150,7 @@ fn load_dep_graph(sess: &Session) -> LoadResult<(Arc<SerializedDepGraph>, WorkPr
         LoadResult::DataOutOfDate => LoadResult::DataOutOfDate,
         LoadResult::LoadDepGraph(path, err) => LoadResult::LoadDepGraph(path, err),
         LoadResult::Ok { data: (bytes, start_pos) } => {
-            let Some(mut decoder) = MemDecoder::new(&bytes, start_pos) else {
+            let Ok(mut decoder) = MemDecoder::new(&bytes, start_pos) else {
                 sess.dcx().emit_warn(errors::CorruptFile { path: &path });
                 return LoadResult::DataOutOfDate;
             };
@@ -192,7 +192,7 @@ pub fn load_query_result_cache(sess: &Session) -> Option<OnDiskCache<'_>> {
     let path = query_cache_path(sess);
     match load_data(&path, sess) {
         LoadResult::Ok { data: (bytes, start_pos) } => {
-            let cache = OnDiskCache::new(sess, bytes, start_pos).unwrap_or_else(|| {
+            let cache = OnDiskCache::new(sess, bytes, start_pos).unwrap_or_else(|()| {
                 sess.dcx().emit_warn(errors::CorruptFile { path: &path });
                 OnDiskCache::new_empty(sess.source_map())
             });