Add boilerplate docs for PointerHits::new and HitData::new (#19259)
# Objective Add documentation for the last two functions in bevy_picking that are missing them. ## Solution Add boilerplate "Constructs an X" to `PointerHits::new()` and `HitData::new()`. This form of no-information documentation of `new()` functions is used in several places in the repo, and @alice-i-cecile agreed that this is a reasonable approach - the params are already documented on the fields within the struct definition. --------- Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
This commit is contained in:
parent
37b16d869d
commit
fe16624d3c
@ -84,7 +84,7 @@ pub struct PointerHits {
|
||||
}
|
||||
|
||||
impl PointerHits {
|
||||
#[expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
|
||||
/// Construct [`PointerHits`].
|
||||
pub fn new(pointer: prelude::PointerId, picks: Vec<(Entity, HitData)>, order: f32) -> Self {
|
||||
Self {
|
||||
pointer,
|
||||
@ -114,7 +114,7 @@ pub struct HitData {
|
||||
}
|
||||
|
||||
impl HitData {
|
||||
#[expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
|
||||
/// Construct a [`HitData`].
|
||||
pub fn new(camera: Entity, depth: f32, position: Option<Vec3>, normal: Option<Vec3>) -> Self {
|
||||
Self {
|
||||
camera,
|
||||
|
Loading…
Reference in New Issue
Block a user