Browse Source

fixed warnings

ignazio 3 years ago
parent
commit
9c426c796e
1 changed files with 7 additions and 6 deletions
  1. 7 6
      runtime-modules/storage/src/lib.rs

+ 7 - 6
runtime-modules/storage/src/lib.rs

@@ -2874,13 +2874,14 @@ impl<T: Trait> Module<T> {
             }));
 
         // either bag_prize account or objects_prize account used (provided they are the same)
-        let designated_account =
-            deletion_prize
-                .as_ref()
-                .map(|dp| dp.account_id.clone())
-                .or(upload_params
+        let designated_account = deletion_prize
+            .as_ref()
+            .map(|dp| dp.account_id.clone())
+            .or_else(|| {
+                upload_params
                     .as_ref()
-                    .map(|p| p.deletion_prize_source_account_id.clone()));
+                    .map(|p| p.deletion_prize_source_account_id.clone())
+            });
 
         Self::ensure_sufficient_balance_for_upload(designated_account, total_upload_fee)?;