mirror of
https://github.com/bevyengine/bevy
synced 2024-11-14 00:47:32 +00:00
e67cfdf82b
# Objective Enables warning on `clippy::undocumented_unsafe_blocks` across the workspace rather than only in `bevy_ecs`, `bevy_transform` and `bevy_utils`. This adds a little awkwardness in a few areas of code that have trivial safety or explain safety for multiple unsafe blocks with one comment however automatically prevents these comments from being missed. ## Solution This adds `undocumented_unsafe_blocks = "warn"` to the workspace `Cargo.toml` and fixes / adds a few missed safety comments. I also added `#[allow(clippy::undocumented_unsafe_blocks)]` where the safety is explained somewhere above. There are a couple of safety comments I added I'm not 100% sure about in `bevy_animation` and `bevy_render/src/view` and I'm not sure about the use of `#[allow(clippy::undocumented_unsafe_blocks)]` compared to adding comments like `// SAFETY: See above`. |
||
---|---|---|
.. | ||
batching | ||
camera | ||
color | ||
mesh | ||
primitives | ||
render_graph | ||
render_phase | ||
render_resource | ||
renderer | ||
texture | ||
view | ||
extract_component.rs | ||
extract_instances.rs | ||
extract_param.rs | ||
extract_resource.rs | ||
globals.rs | ||
globals.wgsl | ||
gpu_component_array_buffer.rs | ||
instance_index.wgsl | ||
lib.rs | ||
maths.wgsl | ||
pipelined_rendering.rs | ||
render_asset.rs | ||
settings.rs | ||
spatial_bundle.rs |