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

Use Default trait for default values #21

Merged
merged 1 commit into from Aug 2, 2020

Conversation

upsuper
Copy link
Contributor

@upsuper upsuper commented Jan 10, 2019

Using Default trait for default values is probably more idiomatic for Rust. In this case, it has a benefit that if a user doesn't need to change anything from the default value, they can simply do Default::default() rather than having to reference the CopyOptions types.

@webdesus
Copy link
Owner

webdesus commented Feb 6, 2019

Sorry for late, I checked it in near time. It's my first project on rust, i many things rewrite today if i had time 😃

@DarrienG
Copy link
Contributor

@upsuper lots of crates have new and a default method. Could you keep the new method un-deprecated while providing Default as an option?

@upsuper
Copy link
Contributor Author

upsuper commented Aug 2, 2020

@DarrienG done

@DarrienG
Copy link
Contributor

DarrienG commented Aug 2, 2020

@webdesus this should be good to go now 🤙

@webdesus webdesus merged commit adb1802 into webdesus:master Aug 2, 2020
@webdesus
Copy link
Owner

webdesus commented Aug 2, 2020

Big thanks @upsuper and @DarrienG ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants