andrewdavidmackenzie / libproc-rs

A rust library for getting information about running processes for Mac and Linux
MIT License
58 stars 17 forks source link

fix: mark PIDFDInfo and PIDRUsage unsafe #145

Open ethanpailes opened 4 months ago

ethanpailes commented 4 months ago

This patch marks the PIDRUsage and PIDFDInfo traits as unsafe, since incorrect implementations of these traits could lead to unsound behavior.

Unfortunately, since these are public traits, this will mean an incompatible version bump for the next release, though hopefully no one is really rolling their own implementation for these guys.

https://doc.rust-lang.org/reference/unsafe-keyword.html#unsafe-traits-unsafe-trait

andrewdavidmackenzie commented 3 months ago

Clippy fails due to missing docs for UNSAFE

andrewdavidmackenzie commented 3 months ago

Fixes #146 I understand?

ethanpailes commented 3 months ago

The test failures should be fixed now. Sorry it took a minute, I had notifications routing to the wrong email.