Skip to content

Commit 21274b1

Browse files
committed
Workaround nightly regression
rust-lang/rust#107461 Due to this, docs.rs can't generate the docs, so we implement the workaround.
1 parent 3c51d64 commit 21274b1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ keywords = ["bevy", "rapier", "bevy-inspector-egui"]
88
categories = ["game-development"]
99
repository = "https://github.com/devildahu/bevy_mod_component_mirror"
1010
exclude = ["assets", ".github"]
11-
version = "0.2.1"
11+
version = "0.3.0"
1212
edition = "2021"
1313

1414
[features]

Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ bevy_mod_component_mirror = { version = "<fill in>", default-features = false }
116116

117117
| bevy | bevy_rapier3d | bevy_mod_component_mirror |
118118
|------|---------------|---------------------------|
119-
| 0.9 | 0.20.0 | 0.2.1 |
119+
| 0.9 | 0.20.0 | <current version> |
120120

121121
## License
122122

src/rapier_mirrors/impulse_joint.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct JointMotor {
4545
#[reflect(ignore)]
4646
pub max_force: Vec3,
4747
}
48+
type LimitsFun = fn(&JointLimits<f32>) -> f32;
4849
impl JointMotor {
4950
fn from_linear(joint: &GenericJoint) -> Option<Self> {
5051
let mk_vec3 = |f: fn(&RapierJointMotor) -> f32| {
@@ -54,7 +55,7 @@ impl JointMotor {
5455
z: f(joint.motor(JointAxis::Z)?),
5556
})
5657
};
57-
let mk_vec3_limit = |f: fn(&JointLimits<f32>) -> f32| Vec3 {
58+
let mk_vec3_limit = |f: LimitsFun| Vec3 {
5859
x: joint.limits(JointAxis::X).map_or(0., f),
5960
y: joint.limits(JointAxis::Y).map_or(0., f),
6061
z: joint.limits(JointAxis::Z).map_or(0., f),
@@ -89,7 +90,7 @@ impl JointMotor {
8990
z: f(joint.motor(JointAxis::AngZ)?),
9091
})
9192
};
92-
let mk_vec3_limit = |f: fn(&JointLimits<f32>) -> f32| Vec3 {
93+
let mk_vec3_limit = |f: LimitsFun| Vec3 {
9394
x: joint.limits(JointAxis::AngX).map_or(0., f),
9495
y: joint.limits(JointAxis::AngY).map_or(0., f),
9596
z: joint.limits(JointAxis::AngZ).map_or(0., f),

0 commit comments

Comments
 (0)