Fix lints introduced in Rust beta 1.80 (#13899)

Resolves #13895

Mostly just involves being more explicit about which parts of the docs
belong to a list and which begin a new paragraph.
- found a few docs that were malformed because of exactly this, so I
fixed that by introducing a paragraph
- added indentation to nearly all multiline lists
- fixed a few minor typos
- added `#[allow(dead_code)]` to types that are needed to test
annotations but are never constructed
([here](https://github.com/bevyengine/bevy/pull/13899/files#diff-b02b63604e569c8577c491e7a2030d456886d8f6716eeccd46b11df8aac75dafR1514)
and
[here](https://github.com/bevyengine/bevy/pull/13899/files#diff-b02b63604e569c8577c491e7a2030d456886d8f6716eeccd46b11df8aac75dafR1523))
- verified that  `cargo +beta run -p ci -- lints` passes
- verified that `cargo +beta run -p ci -- test` passes
This commit is contained in:
Jan Hohenheim 2024-06-17 19:22:01 +02:00 committed by GitHub
parent 4b3246af40
commit 6273227e09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
47 changed files with 181 additions and 176 deletions

View File

@ -1511,6 +1511,7 @@ mod tests {
Empty,
}
#[allow(dead_code)]
#[derive(Asset, TypePath)]
pub struct StructTestAsset {
#[dependency]
@ -1519,6 +1520,7 @@ mod tests {
embedded: TestAsset,
}
#[allow(dead_code)]
#[derive(Asset, TypePath)]
pub struct TupleTestAsset(#[dependency] Handle<TestAsset>);
}

View File

@ -1098,6 +1098,7 @@ pub(crate) struct ProcessorAssetInfo {
/// * when the processor is running in parallel with an app
/// * when processing assets in parallel, the processor might read an asset's `process_dependencies` when processing new versions of those dependencies
/// * this second scenario almost certainly isn't possible with the current implementation, but its worth protecting against
///
/// This lock defends against those scenarios by ensuring readers don't read while processed files are being written. And it ensures
/// Because this lock is shared across meta and asset bytes, readers can ensure they don't read "old" versions of metadata with "new" asset data.
pub(crate) file_transaction_lock: Arc<async_lock::RwLock<()>>,

View File

@ -32,6 +32,7 @@ pub struct AutoExposureCompensationCurve {
/// Each value in the LUT is a `u8` representing a normalized exposure compensation value:
/// * `0` maps to `min_compensation`
/// * `255` maps to `max_compensation`
///
/// The position in the LUT corresponds to the normalized log luminance value.
/// * `0` maps to `min_log_lum`
/// * `LUT_SIZE - 1` maps to `max_log_lum`

View File

@ -67,6 +67,7 @@ pub struct AutoExposureSettings {
/// The mask to apply when metering. The mask will cover the entire screen, where:
/// * `(0.0, 0.0)` is the top-left corner,
/// * `(1.0, 1.0)` is the bottom-right corner.
///
/// Only the red channel of the texture is used.
/// The sample at the current screen position will be used to weight the contribution
/// of each pixel to the histogram:

View File

@ -96,7 +96,7 @@ impl Drop for RenderAppChannels {
/// main schedule can start sooner.
/// - Then the `rendering schedule` is run. See [`RenderSet`](crate::RenderSet) for the standard steps in this process.
/// - In parallel to the rendering thread the [`RenderExtractApp`] schedule runs. By
/// default this schedule is empty. But it is useful if you need something to run before I/O processing.
/// default, this schedule is empty. But it is useful if you need something to run before I/O processing.
/// - Next all the `winit events` are processed.
/// - And finally the `main app schedule` is run.
/// - Once both the `main app schedule` and the `render schedule` are finished running, `extract` is run again.

View File

@ -216,7 +216,7 @@ impl Deref for BindGroup {
/// Some less common scenarios will require "struct-level" attributes. These are the currently supported struct-level attributes:
/// * `uniform(BINDING_INDEX, ConvertedShaderType)`
/// * This also creates a [`Buffer`] using [`ShaderType`] and binds it as a uniform, much
/// much like the field-level `uniform` attribute. The difference is that the entire [`AsBindGroup`] value is converted to `ConvertedShaderType`,
/// like the field-level `uniform` attribute. The difference is that the entire [`AsBindGroup`] value is converted to `ConvertedShaderType`,
/// which must implement [`ShaderType`], instead of a specific field implementing [`ShaderType`]. This is useful if more complicated conversion
/// logic is required. The conversion is done using the [`AsBindGroupShaderType<ConvertedShaderType>`] trait, which is automatically implemented
/// if `&Self` implements [`Into<ConvertedShaderType>`]. Only use [`AsBindGroupShaderType`] if access to resources like [`RenderAssets<GpuImage>`] is

View File

@ -28,8 +28,8 @@ impl TextureSlice {
///
/// * `stretch_value` - The slice will repeat when the ratio between the *drawing dimensions* of texture and the
/// *original texture size* (rect) are above `stretch_value`.
/// - `tile_x` - should the slice be tiled horizontally
/// - `tile_y` - should the slice be tiled vertically
/// * `tile_x` - should the slice be tiled horizontally
/// * `tile_y` - should the slice be tiled vertically
#[must_use]
pub fn tiled(self, stretch_value: f32, (tile_x, tile_y): (bool, bool)) -> Vec<Self> {
if !tile_x && !tile_y {

View File

@ -495,7 +495,7 @@ header_message = \"Examples (WebGL2)\"
// and other characters that don't
// work well in a URL path.
let category_path = root_path.join(
&to_show
to_show
.category
.replace(['(', ')'], "")
.replace(' ', "-")
@ -521,7 +521,7 @@ weight = {}
.unwrap();
categories.insert(to_show.category.clone(), 0);
}
let example_path = category_path.join(&to_show.technical_name.replace('_', "-"));
let example_path = category_path.join(to_show.technical_name.replace('_', "-"));
let _ = fs::create_dir_all(&example_path);
let code_path = example_path.join(Path::new(&to_show.path).file_name().unwrap());
@ -675,7 +675,7 @@ header_message = \"Examples ({})\"
let category_path = root_path.join(&to_build.category);
let _ = fs::create_dir_all(&category_path);
let example_path = category_path.join(&to_build.technical_name.replace('_', "-"));
let example_path = category_path.join(to_build.technical_name.replace('_', "-"));
let _ = fs::create_dir_all(&example_path);
if website_hacks {
@ -685,17 +685,17 @@ header_message = \"Examples ({})\"
let _ = fs::rename(
Path::new("examples/wasm/target/wasm_example.js"),
&example_path.join("wasm_example.js"),
example_path.join("wasm_example.js"),
);
if optimize_size {
let _ = fs::rename(
Path::new("examples/wasm/target/wasm_example_bg.wasm.optimized"),
&example_path.join("wasm_example_bg.wasm"),
example_path.join("wasm_example_bg.wasm"),
);
} else {
let _ = fs::rename(
Path::new("examples/wasm/target/wasm_example_bg.wasm"),
&example_path.join("wasm_example_bg.wasm"),
example_path.join("wasm_example_bg.wasm"),
);
}
pb.inc();