-
Notifications
You must be signed in to change notification settings - Fork 151
RUST-2312 Implement default trait for cstring #625
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
RUST-2312 Implement default trait for cstring #625
Conversation
isabelatkinson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! While we're here, would you mind adding a Default impl for the owned CString type as well? It can also construct an empty string.
Yes it is done |
abr-egn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
|
(Isabel's on vacation, so I'm keeping this moving) Thanks again! Once the tests pass I'll merge this in. |
src/raw/cstr.rs
Outdated
| } | ||
| } | ||
|
|
||
| impl Default for CString { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like clippy wants this to be derived rather than manually written - once that's done this will be good to merge :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have fixed this and added the new method based on @tyilo's comment
|
I think that |
This has also been added based on your changes |
bd471d5 to
3398a48
Compare
3398a48 to
dfc2620
Compare
abr-egn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again, in particular for patience with the rounds of revisions!
No description provided.