- 07 5月, 2015 2 次提交
-
-
由 Ariel Ben-Yehuda 提交于
-
由 Ariel Ben-Yehuda 提交于
-
- 05 5月, 2015 27 次提交
-
-
由 bors 提交于
r? @Manishearth
-
由 Manish Goregaokar 提交于
Right now it's all hosted over GitHub pages so https doesn't work, so only link to the http version.
-
由 Manish Goregaokar 提交于
`str`s is messy but string is incorrect.
-
由 Manish Goregaokar 提交于
This did not render as intended: >This is defined in RFC 5737 - 192.0.2.0/24 (TEST-NET-1) - 198.51.100.0/24 (TEST-NET-2) - 203.0.113.0/24 (TEST-NET-3) vs. > This is defined in RFC 5737 - 192.0.2.0/24 (TEST-NET-1) - 198.51.100.0/24 (TEST-NET-2) - 203.0.113.0/24 (TEST-NET-3)
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
I corrected several spelling errors in the external documentation.
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
Correct pretty-printing of `type Foo<T> where T: Bound = ...;` Fix #25031
-
由 Manish Goregaokar 提交于
This commit does two things: it adds an example for indexing vectors, and it changes the \"Examples\" section to use full sentences. This change was spurred by someone in the #rust IRC channel asking if there was a `.set()` method for changing the `i`-th value of a vector (they had missed that `Vec` implements `IndexMut`, which is easy to do if you're not aware of that trait).
-
由 Manish Goregaokar 提交于
This script used to be used to [extract the grammar sections from the reference](https://github.com/rust-lang/rust/pull/8585), but there is [now a separate src/doc/grammar.md](https://github.com/rust-lang/rust/pull/22308) that generates grammar.html where the grammar sections that used to be in the reference live, so there is no longer a need to extract the grammar from the reference. I
❤ deleting code :) But I totally understand if there's a reason to keep this around that I don't know about :) -
由 Manish Goregaokar 提交于
These all had a typo where they were accessing the seconds field, not the nanoseconds field.
-
由 Manish Goregaokar 提交于
Sweeten the two main HashMap/HashSet examples from [here](http://doc.rust-lang.org/std/collections/struct.HashMap.html) and [here](http://doc.rust-lang.org/std/collections/struct.HashSet.html) with some deref and loop sugar. (I've only tested this using [this playpen][1].) [1]: https://play.rust-lang.org/?code=fn%20main()%20%7B%0A%20%20%20%20use%20std%3A%3Acollections%3A%3AHashMap%3B%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20type%20inference%20lets%20us%20omit%20an%20explicit%20type%20signature%20(which%0A%20%20%20%20%2F%2F%20would%20be%20%60HashMap%3C%26str%2C%20%26str%3E%60%20in%20this%20example).%0A%20%20%20%20let%20mut%20book_reviews%20%3D%20HashMap%3A%3Anew()%3B%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20review%20some%20books.%0A%20%20%20%20book_reviews.insert(%22Adventures%20of%20Huckleberry%20Finn%22%2C%20%20%20%20%22My%20favorite%20book.%22)%3B%0A%20%20%20%20book_reviews.insert(%22Grimms%27%20Fairy%20Tales%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22Masterpiece.%22)%3B%0A%20%20%20%20book_reviews.insert(%22Pride%20and%20Prejudice%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22Very%20enjoyable.%22)%3B%0A%20%20%20%20book_reviews.insert(%22The%20Adventures%20of%20Sherlock%20Holmes%22%2C%20%22Eye%20lyked%20it%20alot.%22)%3B%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20check%20for%20a%20specific%20one.%0A%20%20%20%20if%20!book_reviews.contains_key(%26(%22Les%20Mis%C3%A9rables%22))%20%7B%0A%20%20%20%20%20%20%20%20println!(%22We%27ve%20got%20%7B%7D%20reviews%2C%20but%20Les%20Mis%C3%A9rables%20ain%27t%20one.%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20book_reviews.len())%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20oops%2C%20this%20review%20has%20a%20lot%20of%20spelling%20mistakes%2C%20let%27s%20delete%20it.%0A%20%20%20%20book_reviews.remove(%26(%22The%20Adventures%20of%20Sherlock%20Holmes%22))%3B%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20look%20up%20the%20values%20associated%20with%20some%20keys.%0A%20%20%20%20let%20to_find%20%3D%20%5B%22Pride%20and%20Prejudice%22%2C%20%22Alice%27s%20Adventure%20in%20Wonderland%22%5D%3B%0A%20%20%20%20for%20book%20in%20to_find.iter()%20%7B%0A%20%20%20%20%20%20%20%20match%20book_reviews.get(book)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Some(review)%20%3D%3E%20println!(%22%7B%7D%3A%20%7B%7D%22%2C%20*book%2C%20*review)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20None%20%3D%3E%20println!(%22%7B%7D%20is%20unreviewed.%22%2C%20*book)%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20iterate%20over%20everything.%0A%20%20%20%20for%20(book%2C%20review)%20in%20book_reviews.iter()%20%7B%0A%20%20%20%20%20%20%20%20println!(%22%7B%7D%3A%20%5C%22%7B%7D%5C%22%22%2C%20*book%2C%20*review)%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%7D
-
由 Manish Goregaokar 提交于
- `File::open` is for opening a file in read-only mode - `File::create` is for opening a file in write-only mode, which is what we want instead for this example to make sense
-
由 bors 提交于
This makes the `bit::vec::bench::bench_bit_vec_big_union` benchmark go from `774 ns/iter (+/- 190)` to `602 ns/iter (+/- 5)`. (There's room for more work here too: if one can guarantee 128-bit alignment for the vector, the compiler actually optimises `union`, `intersection` etc. to SIMD instructions, which end up being ~5x faster that the original version, and 4x faster than the optimised version in this patch.)
-
由 bors 提交于
-
由 Alex Crichton 提交于
Right now it's all hosted over GitHub pages so https doesn't work, so only link to the http version.
-
由 Steven Allen 提交于
strs messy but string is something else...
-
由 Tshepang Lekhonkhobe 提交于
-
由 bors 提交于
This was one last spot where directories were being leaked through with arguments of the form `\\?\` which neither `ld.exe` nor `gcc.exe` does understands so the prefix needed to be stripped. Closes #25072
-
由 Brian Anderson 提交于
-
由 Alex Crichton 提交于
This was one last spot where directories were being leaked through with arguments of the form `\\?\` which neither `ld.exe` nor `gcc.exe` does understands so the prefix needed to be stripped. Closes #25072
-
由 bors 提交于
Add several regression tests and remove some unnecessary FIXMEs.
-
由 Alex Crichton 提交于
These all had a typo where they were accessing the seconds field, not the nanoseconds field.
-
由 Johannes Oertel 提交于
-
由 Joseph Crail 提交于
-
由 bors 提交于
I'm uncertain whether the 3 implementations in `net2` should unwrap the socket address values. Without unwrapping it looks like this: ``` UdpSocket { addr: Ok(V4(127.0.0.1:34354)), inner: 3 } TcpListener { addr: Ok(V4(127.0.0.1:9123)), inner: 4 } TcpStream { addr: Ok(V4(127.0.0.1:9123)), peer: Ok(V4(127.0.0.1:58360)), inner: 5 } ``` One issue is that you can create, e.g. `UdpSocket`s with bad addresses, which means you can't just unwrap in the implementation: ``` #![feature(from_raw_os)] use std::net::UdpSocket; use std::os::unix::io::FromRawFd; let sock: UdpSocket = unsafe { FromRawFd::from_raw_fd(-1) }; println!("{:?}", sock); // prints "UdpSocket { addr: Err(Error { repr: Os(9) }), inner: -1 }" ``` Fixes #23134.
-
由 Lee Jeffery 提交于
-
- 04 5月, 2015 11 次提交
-
-
由 bors 提交于
-
由 Huon Wilson 提交于
This makes the `bit::vec::bench::bench_bit_vec_big_union` benchmark go from `774 ns/iter (+/- 190)` to `602 ns/iter (+/- 5)`. (There's room for more work here too: if one can guarantee 128-bit alignment for the vector, the compiler actually optimises `union`, `intersection` etc. to SIMD instructions, which end up being ~5x faster that the original version, and 4x faster than the optimised version in this patch.)
-
由 bors 提交于
- I found n error in the book, before contributing the patch to fix it, I had to find where they were hosted - It took me quite look to find where within the rust-lang *organisation* it was! ... and this should make it easier for the next person in the same position
-
由 Felix S. Klock II 提交于
Fix #25031
-
由 bors 提交于
Without the inline annotation this: str::from_utf8_unchecked( slice::from_raw_parts( ptr, len ) ) doesn't get inlined which can be pretty brutal performance-wise when used in an inner loop of a low level string manipulation method.
-
由 Nick Hamann 提交于
This changes the std::vec module docs to use full sentences. It also adds an example for indexing vectors.
-
由 bors 提交于
Override methods `count`, `last`, and `nth` in vec::IntoIter. #24214
-
由 bors 提交于
-
由 Abhishek Chanda 提交于
-
由 Nick Hamann 提交于
-
由 bors 提交于
Stack overflow detection does not currently work with MUSL, so this test needs to be disabled.
-