Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary unsafe block warning #20773

Closed
1 task done
zelenevn opened this issue Nov 16, 2024 · 1 comment
Closed
1 task done

Unnecessary unsafe block warning #20773

zelenevn opened this issue Nov 16, 2024 · 1 comment
Labels

Comments

@zelenevn
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When building the project locally, there is a single warning related to using unsafed block where it is not needed.
Снимок экрана 2024-11-16 в 22 43 46

Environment

  Model Name: MacBook Pro
  Model Identifier: MacBookPro18,2
  OS: 15.0.1 (24A348)
  Chip: Apple M1 Max
  Total Number of Cores: 10 (8 performance and 2 efficiency)
  Memory: 32 GB

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log

@zelenevn zelenevn added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Nov 16, 2024
@zelenevn
Copy link
Author

Hello! I really liked the project and wanted to contribute to its development. I’m just getting familiar with the project and hope to be of help. During my first local build, I noticed a single warning. The addr_of! macro itself is a safe operation and does not require placement within an unsafe block. It creates a constant raw pointer (*const T) to a memory location without creating an intermediate reference. Type casting using as *const _ and as dispatch_queue_t is also a safe operation in Rust and does not require an unsafe block. I apologize in advance if this issue is irrelevant or improperly formatted; I’m still learning about the project and community guidelines. I have prepared a pull request, and if the issue is indeed relevant, I will publish it.

@zelenevn zelenevn closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2024
@notpeter notpeter added unactionable and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants