Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chap 12.4 Writing a Failing test: cannot find function search in this scope #4026

Open
lonestarx1 opened this issue Sep 1, 2024 · 0 comments

Comments

@lonestarx1
Copy link

  • I have searched open and closed issues and pull requests for duplicates, using these search terms:
    • 12.4
    • failing test
  • I have checked the latest main branch to see if this has already been fixed, in this file:
    • yes

URL to the section(s) of the book with this problem:

Description of the problem:

  • The book simply forgot to mention that after (12-16 code snip) defining just enough of the search function so our test will compile we should also bring search into the scope by going into main.rs and adding use minigrep::{Config, search}; then the code compiles

Suggested fix:
// Main.rs
use minigrep::{Config, search};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant