https://github.com/dpc/rust-default
`use default::default;` for your Rust crate
https://github.com/dpc/rust-default
Last synced: 3 months ago
JSON representation
`use default::default;` for your Rust crate
- Host: GitHub
- URL: https://github.com/dpc/rust-default
- Owner: dpc
- Created: 2018-11-04T05:51:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-22T00:44:51.000Z (over 6 years ago)
- Last Synced: 2025-01-09T23:38:04.462Z (over 1 year ago)
- Language: Rust
- Size: 2.93 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This crate implements standalone `default()` function that can be imported
with `use default::default;` and then in your code you can just:
```
let foo = default();
```
instead of the usual:
```
let foo = Default::default();
```
## Verification Recommendation
To help with the maintaince, the ownership of this crate is potentially shared between multiple developers.
It is recommended to always use [cargo-crev](https://github.com/crev-dev/cargo-crev)
to verify the trustworthiness of each of your dependencies, including this one.