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

Add lint to forbid use of unsafe #54

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

lo48576
Copy link
Contributor

@lo48576 lo48576 commented Aug 26, 2019

This crate is written in completely safe Rust and (currently) does not seem to require power of unsafe.

#[forbid(unsafe_code)] forbids unsafe code, so this prevents unsafe codes from being injected accidentally, and also may help external analyzers to make sure there are no unsafe.

Copy link
Owner

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@saschagrunert
Copy link
Owner

rustfmt does not seem to be happy about the change :)

This crate is written in completely safe Rust and (currently) does not
seem to require power of `unsafe`.

`#[forbid(unsafe_code)]` forbids `unsafe` code, so this prevents
`unsafe` codes from being injected accidentally, and also may help
external analyzers to make sure there are no `unsafe`.
@lo48576
Copy link
Contributor Author

lo48576 commented Aug 26, 2019

Oh sorry, I pushed rustfmt-ed version.

@saschagrunert saschagrunert merged commit ff5f9c1 into saschagrunert:master Aug 26, 2019
@lo48576 lo48576 deleted the feature/forbid-unsafe branch August 26, 2019 17:09
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.

None yet

2 participants