mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Add formatting, linting, and testing to CI checks (#44)
This PR adds `cargo fmt -- --check`, `nx lint ...` and `nx test ...` as GitHub Actions. This will cause future PRs to automatically fail when formatting issues, Clippy warnings, or test failures are present in the changed code.
This commit is contained in:
@@ -232,7 +232,7 @@ pub struct RetargetMap {
|
||||
}
|
||||
|
||||
impl RetargetMap {
|
||||
const MOCAP_NET: [(&str, &str); 80] = [
|
||||
const MOCAP_NET: [(&'static str, &'static str); 80] = [
|
||||
// Spine
|
||||
("LowerBack", "DEF-spine"),
|
||||
("hip", "DEF-spine"),
|
||||
@@ -333,7 +333,7 @@ impl RetargetMap {
|
||||
("LHipJoint", "DEF-pelvis.L"),
|
||||
];
|
||||
|
||||
const MIXAMO: [(&str, &str); 60] = [
|
||||
const MIXAMO: [(&'static str, &'static str); 60] = [
|
||||
// Spine
|
||||
("mixamorig:Hips", "DEF-spine"),
|
||||
("mixamorig:Spine", "DEF-spine.001"),
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ mod hierarchy;
|
||||
mod input;
|
||||
mod inspector;
|
||||
mod interaction;
|
||||
mod math;
|
||||
pub mod math;
|
||||
mod mixamo;
|
||||
mod persistance;
|
||||
mod scene;
|
||||
|
||||
@@ -19,7 +19,7 @@ pub trait InvLerp<T: Sized> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use math::NearlyEq;
|
||||
/// use studio::math::{NearlyEq, InvLerp};
|
||||
///
|
||||
/// let t = 48_f32.inv_lerp(32., 64.);
|
||||
/// // The expected result is 0.5, because 48 is halfway between 32 and 64.
|
||||
@@ -38,7 +38,7 @@ where
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use math::NearlyEq;
|
||||
/// use studio::math::{NearlyEq, Remap};
|
||||
///
|
||||
/// let x = 48_f32.remap((32., 64.), (32., 128.));
|
||||
/// // The expected result is 80, because 48 is halfway between 32 and 64,
|
||||
@@ -56,7 +56,7 @@ pub trait CurveSin {
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// ```ignore
|
||||
/// // This is fine, but it will feel "jerky" because the velocity is
|
||||
/// // constant from start to end.
|
||||
/// fn update_position(dt: f32, start: Vec3, end: Vec3, t: f32) -> Vec3 {
|
||||
|
||||
Reference in New Issue
Block a user