Some small changes for consistency#8452
Conversation
|
|
There was a problem hiding this comment.
this pub is redundant and soon to be an error(?)
There was a problem hiding this comment.
Ah, yeah that is a leftover that I accidentally commited. Is the new rule that no visibility modifiers are allowed inside trait declarations?
|
@blake2-ppc: It's like |
|
Link to IRC snipped that motivated |
|
After some discussion on IRC I removed the |
Added into_owned() method for vectors Added DoubleEnded Iterator impl to Option Renamed nil.rs to unit.rs
- Methodyfied the string ascii extionsion functions - They got added recently, I wrapped them in a trait. - Added `into_owned()` method for vectors - similar to `Str`'s `into_owned()` function, allows to convert to a owned vector without making a copy if the source is a owned vector. - Added `or_some` method to option - similar to `unwrap_or_default`, but keeps the values wrapped in an `Option`. Useful for `Option` chains, eg Iterator impls. - Added `DoubleEndedIterator` impl to `Option` - Just for compatibility with generic Iterator functions. - Renamed nil.rs to unit.rs - the type got renamed ages ago, it's time the source file is as well.
into_owned()method for vectors - similar toStr'sinto_owned()function, allows to convert to a owned vector without making a copy if the source is a owned vector.or_somemethod to option - similar tounwrap_or_default, but keeps the values wrapped in anOption. Useful forOptionchains, eg Iterator impls.DoubleEndedIteratorimpl toOption- Just for compatibility with generic Iterator functions.