clippy
This commit is contained in:
parent
14976e3038
commit
c576e0ad34
13
src/lib.rs
13
src/lib.rs
|
@ -56,18 +56,11 @@ impl Default for Pose {
|
||||||
|
|
||||||
/// Represents a detected hand, as 21 landmarks.
|
/// Represents a detected hand, as 21 landmarks.
|
||||||
/// Landmark names are in [hands::HandLandmark]
|
/// Landmark names are in [hands::HandLandmark]
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Hand {
|
pub struct Hand {
|
||||||
pub data: [Landmark; 21],
|
pub data: [Landmark; 21],
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Hand {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
data: [Landmark::default(); 21],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Represents a detected face mesh, as 478 landmarks.
|
/// Represents a detected face mesh, as 478 landmarks.
|
||||||
pub struct FaceMesh {
|
pub struct FaceMesh {
|
||||||
pub data: [Landmark; 478],
|
pub data: [Landmark; 478],
|
||||||
|
@ -205,7 +198,7 @@ pub mod pose {
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut pose = Pose::default();
|
let mut pose = Pose::default();
|
||||||
pose.data.copy_from_slice(&landmarks[..]);
|
pose.data.copy_from_slice(landmarks);
|
||||||
Some(pose)
|
Some(pose)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -260,7 +253,7 @@ pub mod face_mesh {
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut face_mesh = FaceMesh::default();
|
let mut face_mesh = FaceMesh::default();
|
||||||
face_mesh.data.copy_from_slice(&landmarks[..]);
|
face_mesh.data.copy_from_slice(landmarks);
|
||||||
Some(face_mesh)
|
Some(face_mesh)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user