-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add serialization support for StrBuf #13875
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
Conversation
hjr3
commented
May 1, 2014
- implement Encodable and Decodable for StrBuf
- implement to_json for StrBuf
@@ -2205,6 +2205,10 @@ impl ToJson for ~str { | |||
fn to_json(&self) -> Json { String((*self).clone()) } | |||
} | |||
|
|||
impl ToJson for StrBuf { | |||
fn to_json(&self) -> Json { String((*self).clone().into_owned()) } |
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.
Writing String((*self).as_slice().into_owned())
will be more efficient.
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.
fixed
Thanks; looks pretty good, just a few small comments. |
- implement Encodable and Decodable for StrBuf - implement to_json for StrBuf
appreciate the feedback. all fixed up |
@alexcrichton does this need to be rescheduled? |
It does indeed! Our windows bots have been a little cranky recently... |
- implement Encodable and Decodable for StrBuf - implement to_json for StrBuf
Diagnose private assoc item accesses
`Ty.kind()` is a method. changelog: none