Closed vmx closed 2 years ago
It's very small and I don't think it's code that needs to be maintained by someone. I'd rather avoid an unnecessary dependency. In addition, scopeguard
crate also introduces a lot of unsafe code.
I also missed that it's used in core, which complicates things a bit. Thanks for pointing out the usage if unsafe in scopeguard, that's a good point. I'm closing this PR.
Instead of having a custom scope guard implementation use the established
scopeguard
crate.I made this change to my Serde implementation and I thought I upstream it. I'm a fan of having less code to maintain.
scopeguard
itself doesn't have any further dependencies so the overall build time/code size should stay similar. Though I can also understand if you prefer keeping your dependencies to a minimum.