- 05 3月, 2014 2 次提交
-
-
由 Palmer Cox 提交于
-
由 Marvin Löbel 提交于
- Added `TraitObject` representation to `std::raw`. - Added doc to `std::raw`. - Removed `Any::as_void_ptr()` and `Any::as_mut_void_ptr()` methods as they are uneccessary now after the removal of headers on owned boxes. This reduces the number of virtual calls needed. - Made the `..Ext` implementations work directly with the repr of a trait object. - Removed `Any`-related traits from the prelude. - Added bench for `Any`
-
- 01 3月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries.
-
- 25 2月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
This also inverts the dependency between libserialize and libcollections. cc #8784
-
- 24 2月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
This commit changes the ToStr trait to: impl<T: fmt::Show> ToStr for T { fn to_str(&self) -> ~str { format!("{}", *self) } } The ToStr trait has been on the chopping block for quite awhile now, and this is the final nail in its coffin. The trait and the corresponding method are not being removed as part of this commit, but rather any implementations of the `ToStr` trait are being forbidden because of the generic impl. The new way to get the `to_str()` method to work is to implement `fmt::Show`. Formatting into a `&mut Writer` (as `format!` does) is much more efficient than `ToStr` when building up large strings. The `ToStr` trait forces many intermediate allocations to be made while the `fmt::Show` trait allows incremental buildup in the same heap allocated buffer. Additionally, the `fmt::Show` trait is much more extensible in terms of interoperation with other `Writer` instances and in more situations. By design the `ToStr` trait requires at least one allocation whereas the `fmt::Show` trait does not require any allocations. Closes #8242 Closes #9806
-
- 23 2月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
These two containers are indeed collections, so their place is in libcollections, not in libstd. There will always be a hash map as part of the standard distribution of Rust, but by moving it out of the standard library it makes libstd that much more portable to more platforms and environments. This conveniently also removes the stuttering of 'std::hashmap::HashMap', although 'collections::HashMap' is only one character shorter.
-
- 21 2月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
This "bubble up an error" macro was originally named if_ok! in order to get it landed, but after the fact it was discovered that this name is not exactly desirable. The name `if_ok!` isn't immediately clear that is has much to do with error handling, and it doesn't look fantastic in all contexts (if if_ok!(...) {}). In general, the agreed opinion about `if_ok!` is that is came in as subpar. The name `try!` is more invocative of error handling, it's shorter by 2 letters, and it looks fitting in almost all circumstances. One concern about the word `try!` is that it's too invocative of exceptions, but the belief is that this will be overcome with documentation and examples. Close #12037
-
- 19 2月, 2014 1 次提交
-
-
由 Steven Fackler 提交于
-
- 18 2月, 2014 1 次提交
-
-
由 Huon Wilson 提交于
-
- 15 2月, 2014 2 次提交
-
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
This was previously implemented, and it just needed a snapshot to go through
-
- 08 2月, 2014 1 次提交
-
-
由 Huon Wilson 提交于
Avoid using -1 as a char sentinel, when Option<char> is the perfect thing.
-
- 07 2月, 2014 1 次提交
-
-
由 HeroesGrave 提交于
-
- 06 2月, 2014 1 次提交
-
-
由 Jeff Olson 提交于
- `extra::json` didn't make the cut, because of `extra::json` required dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`, then `extra::json` could move into `serialize` - `libextra`, `libsyntax` and `librustc` depend on the newly created `libserialize` - The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap` and `TreeSet` for `Encodable`/`Decodable` were moved into the respective modules in `extra` - There is some trickery, evident in `src/libextra/lib.rs` where a stub of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for use in the stage0 build, where the snapshot rustc is still making deriving for `Encodable` and `Decodable` point at extra. Big props to @huonw for help working out the re-export solution for this extra: inline extra::serialize stub fix stuff clobbered in rebase + don't reexport serialize::serialize no more globs in libserialize syntax: fix import of libserialize traits librustc: fix bad imports in encoder/decoder add serialize dep to librustdoc fix failing run-pass tests w/ serialize dep adjust uuid dep more rebase de-clobbering for libserialize fixing tests, pushing libextra dep into cfg(test) fix doc code in extra::json adjust index.md links to serialize and uuid library
-
- 04 2月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
-
- 30 1月, 2014 1 次提交
-
-
由 Brendan Zabarauskas 提交于
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal was then lost after `do` was disabled for closures. It's time to let this one go.
-
- 29 1月, 2014 1 次提交
-
-
由 Scott Lawrence 提交于
-
- 22 1月, 2014 2 次提交
-
-
由 Simon Sapin 提交于
[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old from_utf8_owned() behavior
-
由 Simon Sapin 提交于
-
- 21 1月, 2014 1 次提交
-
-
由 Huon Wilson 提交于
-
- 19 1月, 2014 4 次提交
-
-
由 musitdev 提交于
-
由 musitdev 提交于
-
由 musitdev 提交于
commit d00623d60afd460755b749ad5f94935f756f29d2 Author: musitdev <philippe.delrieu@free.fr> Date: Sat Jan 4 22:31:40 2014 +0100 correct last comments. commit ef09d6b6d1eebbd7c713c9dad96ed7bfc19dd884 Author: musitdev <philippe.delrieu@free.fr> Date: Thu Jan 2 20:28:53 2014 +0100 update with the last remarks. commit 46a028fe1fcdc2a7dcdd78a63001793eff614349 Author: musitdev <philippe.delrieu@free.fr> Date: Thu Jan 2 10:17:18 2014 +0100 wrap example code in main function. commit 2472901929bef09786b7aef8ca7c89fbe67d8e3e Author: musitdev <philippe.delrieu@free.fr> Date: Mon Dec 30 19:32:46 2013 +0100 Correct code to compile. commit ed96b2223176781743e984af0e19abcb82150f1f Author: musitdev <philippe.delrieu@free.fr> Date: Thu Dec 5 11:32:28 2013 +0100 Correct the comment based on the PR comment. Change init call to new to reflect last change. commit 38b0390c3533a16f822a6df5f90b907bd8ed6edc Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 22:34:25 2013 +0100 correct from_utf8_owned call. commit 08bed4c5f4fadf93ec457b605a1a1354323d2f5c Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 22:12:41 2013 +0100 correct code ''' commit 02fddcbe2ab37fe842872691105bc4c5cff5abb5 Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 13:25:54 2013 +0100 correct typing error commit b26830b8ddb49f551699e791832ed20640a0fafc Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 13:18:39 2013 +0100 pass make check commit e87c4f53286122efd0d2364ea45600d4fa4d5744 Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 10:47:24 2013 +0100 Add Json example and documentation.
-
由 Flavio Percoco 提交于
There was an old and barely used implementation of pow, which expected both parameters to be uint and required more traits to be implemented. Since a new implementation for `pow` landed, I'm proposing to remove this old impl in favor of the new one. The benchmark shows that the new implementation is faster than the one being removed: test num::bench::bench_pow_function ..bench: 9429 ns/iter (+/- 2055) test num::bench::bench_pow_with_uint_function ...bench: 28476 ns/iter (+/- 2202)
-
- 18 1月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
-
- 09 1月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
This is just an unnecessary trait that no one's ever going to parameterize over and it's more useful to just define the methods directly on the types themselves. The implementors of this type almost always don't want inner_mut_ref() but they're forced to define it as well.
-
- 08 1月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
-
- 12 12月, 2013 1 次提交
-
-
由 Erik Price 提交于
Also remove all instances of 'self within the codebase. This fixes #10889.
-
- 05 12月, 2013 1 次提交
-
-
由 Kevin Ballard 提交于
-
- 30 11月, 2013 5 次提交
-
-
由 Erick Tryzelaar 提交于
-
由 Erick Tryzelaar 提交于
-
由 Erick Tryzelaar 提交于
-
由 Erick Tryzelaar 提交于
-
由 Erick Tryzelaar 提交于
-
- 29 11月, 2013 1 次提交
-
-
由 Alex Crichton 提交于
-
- 27 11月, 2013 3 次提交
-
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
`librustuv`.
-
- 26 11月, 2013 1 次提交
-
-
由 Marvin Löbel 提交于
-
- 24 11月, 2013 1 次提交
-
-
由 Huon Wilson 提交于
Fixes #4244.
-