Hpmason / retour-rs

A cross-platform detour library written in Rust
Other
99 stars 18 forks source link

fix: GenericDetour doesn't accept unsafe fns #15

Closed notpeelz closed 1 year ago

notpeelz commented 1 year ago

The removed line would expand to something like this:

unsafe impl<Ret: 'static, A: 'static> HookableWith<extern "system" fn(A) -> Ret>
  for unsafe extern "system" fn(A) -> Ret
{
}

This lets GenericDetour work with unsafe fns on Rust stable (currently 1.69.0). I'm not sure if this change breaks anything.