Explorar el Código

Cosmetic code

Cesar Rodas hace 10 meses
padre
commit
1f5693591f
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6 6
      utxo/src/transaction/mod.rs

+ 6 - 6
utxo/src/transaction/mod.rs

@@ -222,16 +222,16 @@ impl Transaction {
             created_at: Utc::now(),
         };
         let revision_id = new_revision.rev_id()?;
+        let mut revisions = self.revisions;
+        revisions.push(revision_id.clone());
 
-        let mut new_transaction = Transaction {
+        Ok(Transaction {
             id: self.id,
-            revisions: self.revisions,
-            revision_id: revision_id.clone(),
+            revisions,
+            revision_id,
             transaction: self.transaction,
             revision: new_revision,
-        };
-        new_transaction.revisions.push(revision_id);
-        Ok(new_transaction)
+        })
     }
 
     /// Validates the transaction and its revisions