Skip to content

Commit 4ccc97f

Browse files
authored
ci: address new clippy lints in 1.80 (#331)
Rust 1.80 has been released, and new clippy lints are now being checked in our CI. This PR addresses these lints to uphold the code quality of this repository and get the clippy CI job passing again. The new lint that was failing is `doc_lazy_continuation`, so this PR only really affects docs. This lint was simply `#[allow(...)]`'d in the `ldtk` module since most of the code in this module is auto-generated and any manual changes to it need to be repeated whenever it is regenerated.
1 parent c72b5c8 commit 4ccc97f

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

examples/field_instances/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
//! - health, a non-nullable int.
99
//! - equipment_drops, an array of Equipment values, which is a custom enum.
1010
//! - mother, a nullable entity reference.
11+
//!
1112
//! This example accesses all of these and stores them on the enemy entity via components.
1213
//! With the mother field - it also demonstrates one possible pattern for resolving an LDtk entity
1314
//! reference to an actual bevy "relational" component.

src/app/ldtk_entity.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ use std::{collections::HashMap, marker::PhantomData};
6969
/// Indicates that a [SpriteBundle] field should be created with an actual material/image.
7070
/// There are two forms for this attribute:
7171
/// - `#[sprite_bundle("path/to/asset.png")]` will create the field using the image at the provided
72-
/// path in the assets folder.
72+
/// path in the assets folder.
7373
/// - `#[sprite_bundle]` will create the field using its Editor Visual image in LDtk, if it has one.
74+
///
7475
/// Note that if your editor visual is part of a tilemap, you should use `#[sprite_sheet_bundle]` instead.
7576
/// ```
7677
/// # use bevy::prelude::*;
@@ -102,14 +103,14 @@ use std::{collections::HashMap, marker::PhantomData};
102103
/// with an actual material/image.
103104
/// There are two forms for this attribute:
104105
/// - `#[sprite_sheet_bundle("path/to/asset.png", tile_width, tile_height, columns, rows, padding,
105-
/// offset, index)]` will create the field using all of the information provided.
106-
/// Similar to using [TextureAtlasLayout::from_grid()].
106+
/// offset, index)]` will create the field using all of the information provided.
107+
/// Similar to using [TextureAtlasLayout::from_grid()].
107108
/// - `#[sprite_sheet_bundle]` will create the field using information from the LDtk Editor visual,
108-
/// if it has one.
109+
/// if it has one.
109110
/// - `#[sprite_sheet_bundle(no_grid)]` will create the field using information from the LDtk
110-
/// Editor visual, if it has one, but without using a grid. Instead a single texture will be used.
111-
/// This may be useful if the LDtk entity's visual uses a rectangle of tiles from its tileset,
112-
/// but will prevent using the generated [TextureAtlasLayout] for animation purposes.
111+
/// Editor visual, if it has one, but without using a grid. Instead a single texture will be used.
112+
/// This may be useful if the LDtk entity's visual uses a rectangle of tiles from its tileset,
113+
/// but will prevent using the generated [TextureAtlasLayout] for animation purposes.
113114
/// ```
114115
/// # use bevy::prelude::*;
115116
/// # use bevy_ecs_ldtk::prelude::*;

src/ldtk/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
//! 10. All urls in docs have been changed to hyperlinks with `<>`
2525
//! 11. `From<&EntityInstance>` implemented for [`EntityInstance`]
2626
//! 12. [`LayerInstance::layer_instance_type`] changed from [`String`] to [`Type`].
27+
#![allow(clippy::doc_lazy_continuation)]
2728

2829
use bevy::{
2930
prelude::{Color, Component, IVec2, Vec2},

0 commit comments

Comments
 (0)