Skip to content

fix: add missing Safety documentation for FFI functions#36

Merged
colemanirby merged 2 commits into
ideal-lab5:mainfrom
TrustMeItsCugel:fix/clippy-safety-docs
Sep 4, 2025
Merged

fix: add missing Safety documentation for FFI functions#36
colemanirby merged 2 commits into
ideal-lab5:mainfrom
TrustMeItsCugel:fix/clippy-safety-docs

Conversation

@TrustMeItsCugel
Copy link
Copy Markdown
Contributor

  • Add Safety sections to timelock_get_version(), timelock_init(), and timelock_cleanup()
  • Resolves clippy missing_safety_doc warnings
  • All functions are safe to call from any context despite unsafe extern C marking

- Add Safety sections to timelock_get_version(), timelock_init(), and timelock_cleanup()
- Resolves clippy missing_safety_doc warnings
- All functions are safe to call from any context despite unsafe extern C marking
Copilot AI review requested due to automatic review settings September 4, 2025 01:55

This comment was marked as outdated.

- Add brew uninstall cmake before installing to avoid tap conflicts
- Resolves CI failure where cmake from local/pinned tap conflicts with homebrew/core
- Uses --ignore-dependencies and || true for safe uninstall
@TrustMeItsCugel
Copy link
Copy Markdown
Contributor Author

Hi @driemworks, this is ready for review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds Safety documentation to FFI functions to resolve clippy warnings about missing safety documentation. The PR clarifies that three timelock FFI functions are safe to call despite their unsafe extern "C" signature.

  • Adds Safety sections to timelock_get_version(), timelock_init(), and timelock_cleanup() functions
  • Documents that all functions are safe to call from any context with no special requirements
  • Includes a build system fix to uninstall cmake before reinstallation on macOS

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
timelock-ffi/src/lib.rs Adds Safety documentation sections to three FFI functions
.github/workflows/cross-platform-ffi.yml Adds cmake uninstall step for macOS builds

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown
Contributor

@colemanirby colemanirby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for the quick fix and the documentation updates!

@colemanirby colemanirby merged commit eca4819 into ideal-lab5:main Sep 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants