rust-cookbook
rust-cookbook copied to clipboard
https://rust-lang-nursery.github.io/rust-cookbook
Change the name of the button and its icon according to what's actually displayed on https://rust-lang-nursery.github.io/rust-cookbook/about.html fixes #658 :tada: Hi and welcome! Please read the text below and remove it...
See this screenshot, from the "about" page:  What is referred to as the "expand" button is actually "show hidden lines", and has a different icon.
`lazy_static` is used throughout the cookbook to store data that should be initialised only once. `once_cell` is more flexible and convenient than `lazy_static`. For example, it can be used for...
[This constant](https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#impl) should exist in Rust 2018, which uses Rust 1.31.0.
It is not compiling because of: `?` couldn't convert the error to `Error` --> src/main.rs:90:35 | 67 | fn main() -> Result { | ---------- expected `Error` because of this...
The 2 following tests are failing at master with `cargo test` and are the only failing at this PR: - `rand_choose_sect_create_random_passwords_from_a_set_of_user_defined_characters_line_8` - `rand_range_sect_generate_random_numbers_within_a_range_line_7` The link checker fails at master and...
kennytm on [StackOverflow](https://stackoverflow.com/a/45795699/3990767) provided a great explanation to this problem. It appears that this cannot be generically implemented in a library (because the idea can be extended to tuples, arrays,...
fixes typo: reqwet -> reqwest.
The first example in https://rust-lang-nursery.github.io/rust-cookbook/web/clients/apis.html is not working anymore. Apperently github needs a user agent now. I (as a beginner) changed the code to: ``` let client = reqwest::Client::builder() .user_agent("Rust_Reqwest_Test")...
In the [code example](https://rust-lang-nursery.github.io/rust-cookbook/web/clients/download.html#make-a-partial-download-with-http-range-headers) I see these two lines in the end: ```rust let content = response.text()?; std::io::copy(&mut content.as_bytes(), &mut output_file)?; ``` Looks like the first line is getting text...