checked_sub_lamports with unwrap (#16922)
* checked_sub_lamports with unwrap * avoid unwrap
This commit is contained in:
parent
8c651d2530
commit
63c56b57a9
|
@ -96,7 +96,7 @@ impl RentCollector {
|
||||||
1
|
1
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
account.lamports -= rent_due;
|
let _ = account.checked_sub_lamports(rent_due); // will not fail. We check above.
|
||||||
rent_due
|
rent_due
|
||||||
} else {
|
} else {
|
||||||
let rent_charged = account.lamports();
|
let rent_charged = account.lamports();
|
||||||
|
|
Loading…
Reference in New Issue