From a9943e8d2c8d5d4a2762fcdb269a0e9894e0e587 Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Tue, 9 Apr 2024 13:33:59 -0400 Subject: [PATCH] Fix beta CI (#12913) # Objective - Fixes #12905. ## Solution - Use proper code `` tags for `TaskPoolBuilder::thread_name`. - Remove leftover documentation in `TaskPool` referencing the deleted `TaskPoolInner` struct. - It may be possible to rephrase this, but I do not know enough about the task pool to write something. (cc @james7132 who made the change removing `TaskPoolInner`.) - Ignore a buggy rustdoc lint that thinks `App` is already in scope for `UpdateMode` doc. (Extracted from #12692.) --- crates/bevy_tasks/src/task_pool.rs | 10 +++------- crates/bevy_winit/src/winit_config.rs | 2 ++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/bevy_tasks/src/task_pool.rs b/crates/bevy_tasks/src/task_pool.rs index 300373031a..1e58f128ca 100644 --- a/crates/bevy_tasks/src/task_pool.rs +++ b/crates/bevy_tasks/src/task_pool.rs @@ -37,7 +37,7 @@ pub struct TaskPoolBuilder { /// If set, we'll use the given stack size rather than the system default stack_size: Option, /// Allows customizing the name of the threads - helpful for debugging. If set, threads will - /// be named (), i.e. "MyThreadPool (2)" + /// be named ` ()`, i.e. `"MyThreadPool (2)"`. thread_name: Option, on_thread_spawn: Option>, @@ -106,14 +106,10 @@ impl TaskPoolBuilder { /// will still execute a task, even if it is dropped. #[derive(Debug)] pub struct TaskPool { - /// The executor for the pool - /// - /// This has to be separate from TaskPoolInner because we have to create an `Arc` to - /// pass into the worker threads, and we must create the worker threads before we can create - /// the `Vec>` contained within `TaskPoolInner` + /// The executor for the pool. executor: Arc>, - /// Inner state of the pool + // The inner state of the pool. threads: Vec>, shutdown_tx: async_channel::Sender<()>, } diff --git a/crates/bevy_winit/src/winit_config.rs b/crates/bevy_winit/src/winit_config.rs index 3400e86ba2..412a795a11 100644 --- a/crates/bevy_winit/src/winit_config.rs +++ b/crates/bevy_winit/src/winit_config.rs @@ -58,6 +58,8 @@ impl Default for WinitSettings { } } +// Rustdoc mistakenly believes `App` is already in scope. +#[allow(rustdoc::redundant_explicit_links)] /// Determines how frequently an [`App`](bevy_app::App) should update. /// /// **Note:** This setting is independent of VSync. VSync is controlled by a window's