refactor: standardizes Property::new and Property::new_pre_alloc methods with generics #108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another little PR, but it is only to make the user interface a bit nicer to work with.
It allows to use the same function for owned String and slices. By using
impl Into<String>
, it convert string slices to String when it receives a string slices, but when a String is passed, it will just move it. The implementation of Into for the same type is a function that just return the same type, so it's a zero cost operation. https://doc.rust-lang.org/src/core/convert/mod.rs.html#763-771I marked the old method deprecated, so at the next major release with breaking changes, they could be removed.