Fix clippy lint in single_threaded_task_pool (#9851)

# 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
This commit is contained in:
Nicola Papale 2023-09-19 23:45:40 +02:00 committed by GitHub
parent e4b368721d
commit 41a35ff3d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ pub struct ThreadExecutor<'a>(PhantomData<&'a ()>);
impl<'a> ThreadExecutor<'a> {
/// Creates a new `ThreadExecutor`
pub fn new() -> Self {
Self(PhantomData::default())
Self::default()
}
}