diwakergupta / stacks-blockchain-tob-audit

GNU General Public License v3.0
0 stars 0 forks source link

Redundant `clone` #3

Open smoelius opened 4 years ago

smoelius commented 4 years ago

https://github.com/trailofbits/x-audit-blockstack-core/blob/e2d3d5bae539d242851620e28129af6c4a9de642/src/chainstate/stacks/index/marf.rs#L502-L504 It appears the above could be written more simply as:

        if let Some(miner_tip) = miner_tip {
            file_storage.set_miner_tip(*miner_tip);
        }
smoelius commented 4 years ago

A similar problem appears here: https://github.com/trailofbits/x-audit-blockstack-core/blob/e2d3d5bae539d242851620e28129af6c4a9de642/src/vm/database/marf.rs#L141