Skip to content

Deny clippy::mem_forget - #23

Merged
LudaLunizz merged 1 commit into
Silvertree2010:mainfrom
LudaLunizz:deny-mem-forget
Nov 17, 2026
Merged

LudaLunizz merged 1 commit into
Silvertree2010:mainfrom
LudaLunizz:deny-mem-forget

Conversation

@LudaLunizz

Copy link
Copy Markdown
Collaborator

mem::forget is safe Rust, but the value's destructor never runs, so memory, file handles or child processes it owned stay lost until exit. The code has no use of it today; this adds #![deny(clippy::mem_forget)] to lib.rs and main.rs so it stays that way (the ANSSI secure Rust guide asks for the same lint).

The lint is in clippy's restriction group, so it is not part of clippy::all and the CI line cargo clippy --locked -- -A clippy::all -D warnings still passes. Checked: clippy passes as is, and a temporary std::mem::forget in sys.rs made it fail with the lint's error (then removed). Box::leak is untouched; the themes use it once inside a OnceLock.

🤖 Generated with Claude Code

mem::forget is safe Rust but leaks: the value's destructor never runs. The
code has no use of it today; this keeps it that way (the ANSSI secure Rust
guide asks for the same lint). Box::leak is untouched: the themes use it
once inside a OnceLock.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ccac6810-616d-4b91-b408-32a9aac33b1d
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@LudaLunizz
LudaLunizz merged commit ec126b5 into Silvertree2010:main Nov 17, 2026
3 checks passed
@LudaLunizz LudaLunizz mentioned this pull request Nov 17, 2026
@LudaLunizz
LudaLunizz deleted the deny-mem-forget branch November 27, 2026 19:24
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.

1 participant