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

Fix clippy lint in single_threaded_task_pool #9851

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

nicopap
Copy link
Contributor

@nicopap nicopap commented Sep 19, 2023

Objective

single_threaded_task_pool emitted a warning:

warning: use of `default` to create a unit struct
  --> crates/bevy_tasks/src/single_threaded_task_pool.rs:22:25
   |
22 |         Self(PhantomData::default())
   |                         ^^^^^^^^^^^ help: remove this call to `default`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
   = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default

Solution

fix the lint

@nicopap nicopap added A-Tasks Tools for parallel and async work A-Build-System Related to build systems or continuous integration C-Code-Quality A section of code that is hard to understand or change and removed A-Build-System Related to build systems or continuous integration labels Sep 19, 2023
@nicopap nicopap added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Sep 19, 2023
@mockersf mockersf added this pull request to the merge queue Sep 19, 2023
Merged via the queue into bevyengine:main with commit 41a35ff Sep 19, 2023
26 checks passed
@nicopap nicopap deleted the warn-phantom-default branch September 20, 2023 13:07
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

`single_threaded_task_pool` emitted a warning:

```
warning: use of `default` to create a unit struct
  --> crates/bevy_tasks/src/single_threaded_task_pool.rs:22:25
   |
22 |         Self(PhantomData::default())
   |                         ^^^^^^^^^^^ help: remove this call to `default`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
   = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
```

## Solution

fix the lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Tasks Tools for parallel and async work C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants