Skip to content

Multiple mismatches in 12.4 #4755

Description

@that-random-programmer
  • I have searched open and closed issues and pull requests for duplicates, using these search terms:
    • minigrep
    • duct
    • query
  • I have checked the latest main branch to see if this has already been fixed, in these files:
    • src/ch12-04-testing-the-librarys-functionality.md
    • listings/ch12-an-io-project/listing-12-15/src/lib.rs

URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/ch12-04-testing-the-librarys-functionality.html

Description of the problem:

There are several mismatches. First of all, the test uses the content string:

Rust:
safe, fast, productive.
Pick three.

But the query is duct. Second, the heading says "Creating a failing test", but the test is a regular one, and the book even says:

This test searches for the string `"duct"`. The text we’re searching is three
lines, only one of which contains `"duct"`

Which is obviously wrong. Last, later on in the same chapter, it shows the test working fine, which isn't the case for me.

Suggested fix: Change the query to something else, like "fast"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions