Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo doc ci #224

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/parry-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: parry CI build

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

env:
CARGO_TERM_COLOR: always
Expand All @@ -22,6 +22,18 @@ jobs:
- uses: actions/checkout@v4
- name: Clippy
run: cargo clippy
doc:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ env.RUST_CACHE_KEY }}
Comment on lines +32 to +34
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added that for consistency with rapier, but it might not be necessary 🤔 , I like the more straightforward approach of #227

- name: Cargo doc
run: cargo doc
build-native:
runs-on: ubuntu-latest
env:
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,18 @@ mod simd {
use simba::simd::AutoBoolx4;
/// The number of lanes of a SIMD number.
pub const SIMD_WIDTH: usize = 4;
/// SIMD_WIDTH - 1
/// [`SIMD_WIDTH`] - 1
pub const SIMD_LAST_INDEX: usize = 3;

/// A SIMD float with SIMD_WIDTH lanes.
/// A SIMD float with [`SIMD_WIDTH`] lanes.
#[cfg(feature = "f32")]
pub type SimdReal = simba::simd::AutoF32x4;

/// A SIMD float with SIMD_WIDTH lanes.
/// A SIMD float with [`SIMD_WIDTH`] lanes.
#[cfg(feature = "f64")]
pub type SimdReal = simba::simd::AutoF64x4;

/// A SIMD bool with SIMD_WIDTH lanes.
/// A SIMD bool with [`SIMD_WIDTH`] lanes.
pub type SimdBool = AutoBoolx4;
}

Expand All @@ -260,6 +260,6 @@ mod simd {

/// The number of lanes of a SIMD number.
pub const SIMD_WIDTH: usize = 4;
/// SIMD_WIDTH - 1
/// [`SIMD_WIDTH`] - 1
pub const SIMD_LAST_INDEX: usize = 3;
}
2 changes: 1 addition & 1 deletion src/query/shape_cast/shape_cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub enum ShapeCastStatus {
/// it is often fine to interpret this case as a success.
Failed,
/// The two shape already overlap, or are separated by a distance smaller than
/// [`ShapeCastOptions::target_dist`] at the time 0.
/// [`ShapeCastOptions::target_distance`] at the time 0.
///
/// The witness points and normals provided by the `ShapeCastHit` will have unreliable values unless
/// [`ShapeCastOptions::compute_impact_geometry_on_penetration`] was set to `true` when calling
Expand Down
10 changes: 5 additions & 5 deletions src/shape/heightfield3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ impl HeightField {

/// The two triangles at the cell (i, j) of this heightfield.
///
/// Returns `None` fore triangles that have been removed because of their user-defined status
/// flags (described by the `HeightFieldCellStatus` bitfield).
/// Returns [`None`] fore triangles that have been removed because of their user-defined status
/// flags (described by the [`HeightFieldCellStatus`] bitfield).
pub fn triangles_at(&self, i: usize, j: usize) -> (Option<Triangle>, Option<Triangle>) {
if i >= self.heights.nrows() - 1 || j >= self.heights.ncols() - 1 {
return (None, None);
Expand Down Expand Up @@ -409,10 +409,10 @@ impl HeightField {

/// Computes the pseudo-normals of the triangle identified by the given id.
///
/// Returns `None` if the heightfield’s [`HeightfieldFlags::FIX_INTERNAL_EDGES`] isn’t set, or
/// Returns [`None`] if the heightfield’s [`HeightFieldFlags::FIX_INTERNAL_EDGES`] isn’t set, or
/// if the triangle doesn’t exist due to it being removed by its status flag
/// (`HeightFieldCellStatus::LEFT_TRIANGLE_REMOVED` or
/// `HeightFieldCellStatus::RIGHT_TRIANGLE_REMOVED`).
/// ([`HeightFieldCellStatus::LEFT_TRIANGLE_REMOVED`] or
/// [`HeightFieldCellStatus::RIGHT_TRIANGLE_REMOVED`]).
pub fn triangle_normal_constraints(&self, id: u32) -> Option<TrianglePseudoNormals> {
if self.flags.contains(HeightFieldFlags::FIX_INTERNAL_EDGES) {
let (i, j, left) = self.split_triangle_id(id);
Expand Down
2 changes: 1 addition & 1 deletion src/shape/support_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait SupportMap {
transform * self.local_support_point(&local_dir)
}

/// Same as `self.support_point` except that `dir` is normalized.
/// Same as [`SupportMap::support_point`] except that `dir` is normalized.
fn support_point_toward(
&self,
transform: &Isometry<Real>,
Expand Down
6 changes: 3 additions & 3 deletions src/shape/trimesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ pub struct TopoHalfEdge {
pub next: u32,
/// This half-edge twin on the adjacent triangle.
///
/// This is `u32::MAX` if there is no twin.
/// This is [`u32::MAX`] if there is no twin.
pub twin: u32,
/// The first vertex of this edge.
pub vertex: u32,
Expand Down Expand Up @@ -433,7 +433,7 @@ impl TriMesh {
*self = TriMesh::with_flags(vertices, indices, self.flags);
}

/// Create a `TriMesh` from a set of points assumed to describe a counter-clockwise non-convex polygon.
/// Create a [`TriMesh`] from a set of points assumed to describe a counter-clockwise non-convex polygon.
///
/// This operation may fail if the input polygon is invalid, e.g. it is non-simple or has zero surface area.
#[cfg(feature = "dim2")]
Expand Down Expand Up @@ -912,7 +912,7 @@ impl TriMesh {

/// Returns the pseudo-normals of one of this mesh’s triangles, if it was computed.
///
/// This returns `None` if the pseudo-normals of this triangle were not computed.
/// This returns [`None`] if the pseudo-normals of this triangle were not computed.
/// To have its pseudo-normals computed, be sure to set the [`TriMeshFlags`] so that
/// they contain the [`TriMeshFlags::FIX_INTERNAL_EDGES`] flag.
#[cfg(feature = "dim3")]
Expand Down