The visibilty of the burn() function in is public is pure and shouldn't be.
Vulnerability Details
The visibility of the burn function is public. However, the function isn't called within the contract, so there's almost no need for it to be public. The visibility is better set as external. It saves gas costs and is also consistent with the mint function.
Incorrect visibility function
Severity
Low Risk
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/d1c5501aa79320ca0aeaa73f47f0dbc88c7b77e2/src/DecentralizedStableCoin.sol#L46
Summary
The visibilty of the burn() function in is public is pure and shouldn't be.
Vulnerability Details
The visibility of the burn function is public. However, the function isn't called within the contract, so there's almost no need for it to be public. The visibility is better set as external. It saves gas costs and is also consistent with the mint function.
Impact
The impact isn't very much.
Tools Used
Code analysis
Recommendations
Change visibility from public to external