Errata

Programming Rust

Errata for Programming Rust

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
ePub
Page n/a
text

Current Copy: well. If the right number of arguments is present, we putt them in an Arguments struct, and return it. Then we’ll... Suggested: "we putt them in an Arguments struct," should be "we put them in an Arguments struct,"

Anonymous  Sep 09, 2021  Nov 05, 2021
ePub
Page n/a
text

Current Copy: square root of two. When searching the documentation, remember that there pages for both the types themselves, named “f32 (primitive type)” and Suggested: should be "remember that there are pages for both the types themselves,"

Anonymous  Sep 09, 2021  Nov 05, 2021
Safari Books Online
Chapter 3. Expressions > Why Rust Has loop > 11th Paragraph

std::process:exit() -> std::process::exit()

Note from the Author or Editor:
Change "std::process:exit()" to "std::process::exit()" (adding one colon) in the Expressions chapter.

Sungmann Cho  Sep 06, 2020  Jun 11, 2021
Safari Books Online
Chapter 2 Safari
Chapter 2

In chapter 2 under "Concurrent Mandelbrot Program", it says: To use it, we must add the following line to our Cargo.toml file: crossbeam = "0.2" but then later when it shows the whole Cargo.toml it shows 0.8: [dependencies] num = "0.4" image = "0.13" crossbeam = "0.8"

Note from the Author or Editor:
This has been corrected.

Vince  May 12, 2021  Jun 11, 2021
Safari Books Online
preface
Navigating This Book, 4th paragraph

The paragraph describes the remaining chapters of the book but omits chapter 20 on asynchronous programming.

Note from the Author or Editor:
This has been fixed.

Anonymous  May 23, 2021  Jun 11, 2021
Safari Books Online
Chapter 2
6th code block in "A Concurrent Mandelbrot Program"

The crossbeam dependency is added with version constraint = "0.2", this leads to a compilation error, because the closure to spawner.spawn has 0 arguments in crossbeam 0.2, but the code is written for crossbeam 0.8 which expects 1 argument.

Note from the Author or Editor:
Fixed in current text.

Joeri Samson  May 25, 2021  Jun 11, 2021
Safari Books Online
Chapter 2
First code block for "Mapping from Pixels to Complex Numbers"

The test for pixel_to_point uses a size where bounds.0 and bounds.1 are both 100, and the width and height are both 2. The result is that this test passes when a copy/paste error leads to code like this: ` im: upper_left.im - pixel.1 as f64 * height / bounds.0 as f64`, it also passes when you would use the width instead of height in that formula, but that's more likely to become a warning because height would be unused in pixel_to_point. A test that catches this might be something like: assert_eq!(pixel_to_point((100, 200), (25, 150), Complex { re: -1.0, im: 0.0 }, Complex { re: 1.0, im: -1.0 }), Complex { re: -0.5, im: -0.75 }); Which catches both of these separately and both of these made together.

Note from the Author or Editor:
This is a great suggestion. I think you meant (25, 175). I'll see if we can squeeze this in.

Joeri Samson  May 25, 2021  Jun 11, 2021
Printed
Page 20
Last paragraph, 1st sentence

“401 BAD REQUEST” => “400 BAD REQUEST”

xehpuk  Jul 31, 2021  Nov 05, 2021
PDF
Page 60
7th paragraph

“f64 (primitive type) => “f64 (primitive type)"

Sungmann Cho  Jun 28, 2021  Nov 05, 2021
Printed
Page 73
3rd paragraph, 1st sentence

“String literals” (two spaces) => “String literals”

xehpuk  Aug 03, 2021  Nov 05, 2021
Printed
Page 134
Precedence and Associativity, first sentence

"Table 6-1 summarizes of Rust expression syntax." => "Table 6-1 summarizes Rust's expression syntax."

Anonymous  Aug 15, 2021  Nov 05, 2021
Printed
Page 152
Assignment, third paragraph

"The full list is given in Table 6-1, at the end of this chapter", but the table starts on page 135 at the beginning of the chapter.

Anonymous  Aug 15, 2021  Nov 05, 2021
Printed
Page 163
println!() code block

“failed to lookup” => “failed to look up”

xehpuk  Aug 07, 2021  Nov 05, 2021
PDF
Page 249
8th paragraph

iit's unpacking -> it's unpacking

Sungmann Cho  Jun 28, 2021  Nov 05, 2021
PDF
Page 263
1st paragraph

tthe -> the

Sungmann Cho  Jul 01, 2021  Nov 05, 2021
PDF
Page 442
6th paragraph

Returnsan -> Returns an

Sungmann Cho  Jul 04, 2021  Nov 05, 2021
PDF
Page 492
last paragraph

wha tever -> whatever

Sungmann Cho  Jul 09, 2021  Nov 05, 2021
PDF
Page 663
1st paragraph

missing opening double quote

Sungmann Cho  Jul 11, 2021  Nov 05, 2021