parsec-cloud
parsec-cloud copied to clipboard
Deny undocumented unsafe block in Rust
Set the clippy flag undocumented_unsafe_block to deny. Thus it require us to document unsafe block to explain:
Why the unsafe block is OK here.
To simplify the development, you may update your clippy configuration. On VScode with rust-analyzer extension, open .vscode/settings.json and add the following:
"rust-analyzer.checkOnSave.command": "clippy",
"rust-analyzer.checkOnSave.extraArgs": [
"--",
"--deny=clippy::self_named_module_files",
"--deny=clippy::undocumented_unsafe_blocks"
],
Can you wait my PR that add unsafe block #3219 ?
Can you wait my PR that add unsafe block #3219 ?
You just need to add SAFETY: in front of the comment you've added for the unsafe block