You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-12-23 15:01:49 +02:00
Add safety comments and use consistent format for existing ones. (#1981)
We should have safety comments on all `unsafe` blocks, to set a good example.
This commit is contained in:
@@ -28,7 +28,7 @@ pub unsafe trait AsBytes {
|
||||
}
|
||||
}
|
||||
|
||||
// Safe because u32 has a defined representation and no padding.
|
||||
// SAFETY: `u32` has a defined representation and no padding.
|
||||
unsafe impl AsBytes for u32 {}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user