Skip to content

Commit

Permalink
Fix/suppress upcoming clippy::doc_markdown lint.
Browse files Browse the repository at this point in the history
In nightly the lint has been expanded to detect "foo()" as an item name.
  • Loading branch information
kpreid committed Dec 19, 2023
1 parent 4357f5a commit 301fb9e
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion all-is-cubes-gpu/src/in_wgpu/space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ impl<I: time::Instant> SpaceRenderer<I> {
}

/// Generate debug lines for the current state of the renderer, assuming
/// draw() was just called.
/// `draw()` was just called.
pub(crate) fn debug_lines(&self, camera: &Camera, v: &mut Vec<WgpuLinesVertex>) {
let Some(csm) = &self.csm else {
return;
Expand Down
2 changes: 1 addition & 1 deletion all-is-cubes-port/src/gltf/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl PartialEq for GltfDataDestination {
/// an in-memory buffer to a file based on the length, and in any case
/// remembers the length written and encodes the final URI of the data.
///
/// Does not guarantee the length is correct if write() is called after
/// Does not guarantee the length is correct if `write()` is called after
/// an IO error was previously returned.
#[derive(Debug)]
enum SwitchingWriter {
Expand Down
2 changes: 1 addition & 1 deletion all-is-cubes-server/src/bin/aic-server.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! main() for a server that serves the All is Cubes client as well as being a game
//! `main()` for a server that serves the All is Cubes client as well as being a game
//! server.
// Crate-specific lint settings. (General settings can be found in the workspace manifest.)
Expand Down
2 changes: 1 addition & 1 deletion all-is-cubes-wasm/src/gameapp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl WebSession {
self_rc
}

/// This method is broken out of new() so we can just use `self`. Well, some of the time.
/// This method is broken out of `new()` so we can just use `self`. Well, some of the time.
/// TODO: reconsider
fn init_dom(self: Rc<Self>) {
self.add_canvas_to_self_event_listener(
Expand Down
1 change: 1 addition & 0 deletions all-is-cubes/src/block/evaluated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ impl<'a> arbitrary::Arbitrary<'a> for Evoxels {
}
}

#[allow(clippy::doc_markdown)] // https://github.com/rust-lang/rust-clippy/issues/9473
/// The result of <code>[AIR].[evaluate()](Block::evaluate)</code>, as a constant.
/// This may be used when an [`EvaluatedBlock`] value is needed but there is no block
/// value.
Expand Down
2 changes: 1 addition & 1 deletion all-is-cubes/src/math/rotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ mod tests {
}
}

/// We can compute the inverse via iterate().
/// We can compute the inverse via `iterate()`.
/// This test also serves to regenerate the inverse table.
#[test]
fn inverse_from_iterate() {
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/raycast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ mod tests {
}

/// Regression test (found by fuzzing) for being outside of integer
/// range while also using within().
/// range while also using `within()`.
#[test]
fn start_outside_of_integer_range_with_bounds() {
let bounds = GridAab::from_lower_size([0, 0, 0], [10, 10, 10]);
Expand Down Expand Up @@ -1146,7 +1146,7 @@ mod tests {
);
}

/// within() wasn't working for axis-aligned rays that don't intersect the world,
/// `within()` wasn't working for axis-aligned rays that don't intersect the world,
/// which should produce zero steps.
#[test]
fn regression_test_2() {
Expand Down
2 changes: 1 addition & 1 deletion all-is-cubes/src/space/palette.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ impl crate::universe::VisitRefs for Palette {
impl Clone for Palette {
/// Cloning a [`Palette`] produces a copy which is independently mutable and
/// independently tracks block changes, but initially has the same state. It will
/// reevaluate on the next step().
/// reevaluate on the next `step()`.
fn clone(&self) -> Self {
// Construct the new set with a full todo so that it establishes listeners.
// This will unfortunately also cause a reevaluation, but avoiding that would
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/space/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn initial_state_consistency() {
.consistency_check();
}

/// set() returns Ok when the cube was changed or already equal.
/// `set()` returns Ok when the cube was changed or already equal.
#[test]
fn set_success() {
let [first, second] = make_some_blocks();
Expand All @@ -61,7 +61,7 @@ fn set_success() {
space.consistency_check(); // bonus testing
}

/// Test set() with a block that fails evaluation.
/// Test `set()` with a block that fails evaluation.
/// This should succeed but leave a placeholder.
///
/// This test case should also cover `RefError::InUse` and other evaluation errors.
Expand Down
4 changes: 2 additions & 2 deletions test-renderers/src/test_cases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,9 @@ async fn light(mut context: RenderTestContext, option: LightingOption) {
.await;
}

/// Test calling renderer's draw() without update().
/// Test calling renderer's `draw()` without `update()`.
/// This is not directly useful/plausible by itself, but is intended to
/// exercise robustness in the presence of errors that stop update() from
/// exercise robustness in the presence of errors that stop `update()` from
/// completing.
async fn no_update(mut context: RenderTestContext) {
let mut universe = Universe::new();
Expand Down

0 comments on commit 301fb9e

Please sign in to comment.