unicorn-engine / unicorn

Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
http://www.unicorn-engine.org
GNU General Public License v2.0
7.33k stars 1.31k forks source link

fix: Make functions that deref ptr unsafe #1866

Closed mlgiraud closed 10 months ago

mlgiraud commented 11 months ago

Move the unsafe for functions that dereference a pointer that is passed as unsafe to function level. For an explanation why this was bad see here: https://rust-lang.github.io/rust-clippy/master/index.html#/not_unsafe_ptr_arg_deref

wtdcode commented 11 months ago

LGTM and wait for CI but please separate cargo fmt in a standalone commit next time.

wtdcode commented 10 months ago

Thansk and welcome!