bevy/crates/bevy_utils/src
Carter Anderson b6a647cc01 default() shorthand (#4071)
Adds a `default()` shorthand for `Default::default()` ... because life is too short to constantly type `Default::default()`.

```rust
use bevy::prelude::*;

#[derive(Default)]
struct Foo {
  bar: usize,
  baz: usize,
}

// Normally you would do this:
let foo = Foo {
  bar: 10,
  ..Default::default()
};

// But now you can do this:
let foo = Foo {
  bar: 10,
  ..default()
};
```

The examples have been adapted to use `..default()`. I've left internal crates as-is for now because they don't pull in the bevy prelude, and the ergonomics of each case should be considered individually.
2022-03-01 20:52:09 +00:00
..
default.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
enum_variant_meta.rs EnumVariantMeta derive (#1972) 2021-04-21 23:46:54 +00:00
label.rs Bevy app docs (#3539) 2022-01-06 23:16:47 +00:00
lib.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00