Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Use clone trait instead of copy and make it optional #4

Merged
merged 4 commits into from
Jan 18, 2020

Conversation

LeonMatthes
Copy link
Contributor

@LeonMatthes LeonMatthes commented Jan 17, 2020

Hi, I wanted to use this library for a pet project I'm working on, and I noticed it only supports elements of the Copy trait, which seems pretty restrictive, so I allowed users to use it with the Clone trait, and made that trait optional too.

My workflow also used rustfmt to reformat the code, which kind of obfuscates the diff, sorry about that, I only made real changes to the impl blocks around from_example and resize.

Because this is introduces a backward compatible API change, I bumped the version number to 0.2.0

@nicholasbishop
Copy link
Owner

Thanks for the patch :) I went ahead and formatted the repo with cargo fmt to reduce the diff here, could you rebase your changes on that? Thanks

@LeonMatthes
Copy link
Contributor Author

Alright, the diff had a few merge conflicts due to both of us using rust fmt, but Github helped me resolve that quickly. Everything's clean now.

Just FIY, I'll probably add another PR in a few minutes that adds implementations for serde Serialize and Deserialize traits once I read up on how to use cargo features.
I will try and keep the two PRs separate from each other in case you want to merge one, but not the other.

@nicholasbishop nicholasbishop merged commit 50a578d into nicholasbishop:master Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants