- 13 8月, 2014 1 次提交
-
-
由 Aaron Turon 提交于
-
- 06 8月, 2014 1 次提交
-
-
由 nham 提交于
-
- 02 8月, 2014 1 次提交
-
-
由 Joseph Crail 提交于
-
- 30 7月, 2014 1 次提交
-
-
由 Erick Tryzelaar 提交于
-
- 28 7月, 2014 1 次提交
-
-
由 Jonas Hietala 提交于
Reword comments on unsafe methods regarding UTF-8.
-
- 24 7月, 2014 6 次提交
-
-
由 Adolfo Ochagavía 提交于
-
由 Adolfo Ochagavía 提交于
Replaced by `string::raw::from_parts` [breaking-change]
-
由 Adolfo Ochagavía 提交于
Replaced by `string::raw::from_buf_len` [breaking-change]
-
由 Adolfo Ochagavía 提交于
Replaced by `string::raw::from_utf8` [breaking-change]
-
由 Brian Anderson 提交于
-
由 Brian Anderson 提交于
Implement for Vec, DList, RingBuf. Add MutableSeq to the prelude. Since the collections traits are in the prelude most consumers of these methods will continue to work without change. [breaking-change]
-
- 22 7月, 2014 2 次提交
-
-
由 Corey Richardson 提交于
I blame @ChrisMorgan for the hyphens.
-
由 Ted Horst 提交于
-
- 16 7月, 2014 7 次提交
-
-
由 Adolfo Ochagavía 提交于
-
由 Adolfo Ochagavía 提交于
Use `String::from_utf8_lossy` instead [breaking-change]
-
由 Adolfo Ochagavía 提交于
Use `String::from_utf16_lossy` instead. [breaking-change]
-
由 Adolfo Ochagavía 提交于
Use `String::from_utf16` instead [breaking-change]
-
由 Adolfo Ochagavía 提交于
Replaced by `String::from_byte` [breaking-change]
-
由 Adolfo Ochagavía 提交于
Use `String::from_chars` instead [breaking-change]
-
由 Adolfo Ochagavía 提交于
Use `String::from_utf8` instead [breaking-change]
-
- 09 7月, 2014 1 次提交
-
-
由 Richo Healey 提交于
[breaking-change]
-
- 06 7月, 2014 1 次提交
-
-
由 Simon Sapin 提交于
``` test new_push_byte ... bench: 6985 ns/iter (+/- 487) = 17 MB/s test old_push_byte ... bench: 19335 ns/iter (+/- 1368) = 6 MB/s ``` ```rust extern crate test; use test::Bencher; static TEXT: &'static str = "\ Unicode est un standard informatique qui permet des échanges \ de textes dans différentes langues, à un niveau mondial."; #[bench] fn old_push_byte(bencher: &mut Bencher) { bencher.bytes = TEXT.len() as u64; bencher.iter(|| { let mut new = String::new(); for b in TEXT.bytes() { unsafe { new.as_mut_vec().push_all([b]) } } }) } #[bench] fn new_push_byte(bencher: &mut Bencher) { bencher.bytes = TEXT.len() as u64; bencher.iter(|| { let mut new = String::new(); for b in TEXT.bytes() { unsafe { new.as_mut_vec().push(b) } } }) } ```
-
- 02 7月, 2014 1 次提交
-
-
由 Brian Anderson 提交于
Being able to index into the bytes of a string encourages poor UTF-8 hygiene. To get a view of `&[u8]` from either a `String` or `&str` slice, use the `as_bytes()` method. Closes #12710. [breaking-change]
-
- 25 6月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
This adds an implementation of Add for String where the rhs is <S: Str>. The other half of adding strings is where the lhs is <S: Str>, but coherence and the libcore separation currently prevent that.
-
- 09 6月, 2014 2 次提交
-
-
由 Alex Crichton 提交于
This commit moves Mutable, Map, MutableMap, Set, and MutableSet from `core::collections` to the `collections` crate at the top-level. Additionally, this removes the `deque` module and moves the `Deque` trait to only being available at the top-level of the collections crate. All functionality continues to be reexported through `std::collections`. [breaking-change]
-
由 Brian Anderson 提交于
Also renames the `Container` trait to `Collection`. [breaking-change]
-
- 06 6月, 2014 2 次提交
-
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
As with the previous commit with `librand`, this commit shuffles around some `collections` code. The new state of the world is similar to that of librand: * The libcollections crate now only depends on libcore and liballoc. * The standard library has a new module, `std::collections`. All functionality of libcollections is reexported through this module. I would like to stress that this change is purely cosmetic. There are very few alterations to these primitives. There are a number of notable points about the new organization: * std::{str, slice, string, vec} all moved to libcollections. There is no reason that these primitives shouldn't be necessarily usable in a freestanding context that has allocation. These are all reexported in their usual places in the standard library. * The `hashmap`, and transitively the `lru_cache`, modules no longer reside in `libcollections`, but rather in libstd. The reason for this is because the `HashMap::new` contructor requires access to the OSRng for initially seeding the hash map. Beyond this requirement, there is no reason that the hashmap could not move to libcollections. I do, however, have a plan to move the hash map to the collections module. The `HashMap::new` function could be altered to require that the `H` hasher parameter ascribe to the `Default` trait, allowing the entire `hashmap` module to live in libcollections. The key idea would be that the default hasher would be different in libstd. Something along the lines of: // src/libstd/collections/mod.rs pub type HashMap<K, V, H = RandomizedSipHasher> = core_collections::HashMap<K, V, H>; This is not possible today because you cannot invoke static methods through type aliases. If we modified the compiler, however, to allow invocation of static methods through type aliases, then this type definition would essentially be switching the default hasher from `SipHasher` in libcollections to a libstd-defined `RandomizedSipHasher` type. This type's `Default` implementation would randomly seed the `SipHasher` instance, and otherwise perform the same as `SipHasher`. This future state doesn't seem incredibly far off, but until that time comes, the hashmap module will live in libstd to not compromise on functionality. * In preparation for the hashmap moving to libcollections, the `hash` module has moved from libstd to libcollections. A previously snapshotted commit enables a distinct `Writer` trait to live in the `hash` module which `Hash` implementations are now parameterized over. Due to using a custom trait, the `SipHasher` implementation has lost its specialized methods for writing integers. These can be re-added backwards-compatibly in the future via default methods if necessary, but the FNV hashing should satisfy much of the need for speedier hashing. A list of breaking changes: * HashMap::{get, get_mut} no longer fails with the key formatted into the error message with `{:?}`, instead, a generic message is printed. With backtraces, it should still be not-too-hard to track down errors. * The HashMap, HashSet, and LruCache types are now available through std::collections instead of the collections crate. * Manual implementations of hash should be parameterized over `hash::Writer` instead of just `Writer`. [breaking-change]
-
- 02 6月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
-
- 31 5月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
-
- 29 5月, 2014 1 次提交
-
-
由 Kevin Ballard 提交于
We already have into_string(), but it was implemented in terms of into_owned(). Flip it around and deprecate into_owned(). Remove a few spurious calls to .into_owned() that existed in libregex and librustdoc.
-
- 28 5月, 2014 1 次提交
-
-
由 Richo Healey 提交于
[breaking-change]
-
- 27 5月, 2014 1 次提交
-
-
由 Richo Healey 提交于
[breaking-change]
-
- 25 5月, 2014 1 次提交
-
-
由 Richo Healey 提交于
[breaking-change]
-
- 23 5月, 2014 3 次提交
-
-
由 Patrick Walton 提交于
[breaking-change]
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
- 15 5月, 2014 1 次提交
-
-
由 Kevin Ballard 提交于
This allows the original vector to be recovered in the event that it is not UTF-8. [breaking-change]
-
- 13 5月, 2014 1 次提交
-
-
由 Dylan Braithwaite 提交于
Added functions pop_char and shift_char to StrBuf struct along with appropriate unit tests, using the same test case as push_char. Changed StrBuf.shift_byte() that it no longer reallocates the buffer by just calling Vec.shift(); Added warning to shift_char()'s docs about it having to copy the whole buffer, as per the docs for Vec.shift().
-
- 11 5月, 2014 1 次提交
-
-
由 Steven Sheldon 提交于
-