fsr-rs icon indicating copy to clipboard operation
fsr-rs copied to clipboard

Document unsafe function

Open repi opened this issue 2 years ago • 0 comments

These functions do not have # Safety documentation to describe how to uphold safety invariants when calling them, clippy finds it:

warning: unsafe function's docs miss `# Safety` section
   --> fsr/src/lib.rs:351:5
    |
351 |     pub unsafe fn dispatch(&mut self, desc: DispatchDescription) -> Result<(), Error> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
    = note: `#[warn(clippy::missing_safety_doc)]` on by default

warning: unsafe function's docs miss `# Safety` section
   --> fsr/src/lib.rs:359:5
    |
359 |     pub unsafe fn destroy(&mut self) -> Result<(), Error> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc

warning: `fsr` (lib) generated 2 warnings

repi avatar Sep 29 '23 09:09 repi