Uh oh!
There was an error while loading. Please reload this page.
path: Refactor set_extension and contains_nul - #13395
Conversation
alexcrichton
commented
Apr 10, 2014
Could you elaborate a little more on what the use case is for requiring the Container trait? I would expect that it's just "one more trait" to implement, and it doesn't have a particularly compelling reason to require. |
Ryman
commented
Apr 10, 2014
It was more that it felt implied, but I guess you're right and it could be restrictive/bothersome to require it. Would you instead accept if I instead extend |
alexcrichton
commented
Apr 10, 2014
I would figure that I think that this trait may be seeing a bit more prime time than it was intended for, sadly, it's mostly just to make |
Ryman
commented
Apr 11, 2014
Updated commits do as mentioned above, feel free to close pr if unwanted. |
alexcrichton
commented
Apr 11, 2014
Would you be ok with omitting the addition of the |
There was a problem hiding this comment.
Stylistically, this if/else should look like:
ifcontains_nul(s){None}else{Some(...)}Ryman
commented
Apr 11, 2014
Nuked byte_len() addition and fixed |
…xcrichton Also some minor cleanup in Path related to this.
…nishearth Add lint for unnecessary lifetime bounded &str return Closesrust-lang#305. Currently implemented with a pretty strong limitation that it can only see the most basic implicit return, but this should be fixable by something with more time and brain energy than me. Cavets from rust-lang#13388 apply, as I have not had a review on my clippy lints yet so am pretty new to this. ``` changelog: [`unnecessary_literal_bound`]: Add lint for unnecessary lifetime bounded &str return. ```
Also some minor cleanup in Path related to this.