Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix simple example in README #314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix simple example in README #314

wants to merge 1 commit into from

Conversation

lynn
Copy link

@lynn lynn commented Dec 5, 2022

Maybe I'm doing something wrong, but the example didn't compile for me until I added a use crate::reverse:

PS C:\code\playground> cargo test
   Compiling playground v0.1.0 (C:\code\playground)
  --> src\main.rs:17:19
   |
17 |             xs == reverse(&reverse(&xs))
   |                   ^^^^^^^ not found in this scope
   |
help: consider importing this function
   |
15 |     use crate::reverse;
   |

I also ran rustfmt on it; the vec![] is a suggestion from it.

Maybe I'm doing something wrong, but the example didn't compile for me until I added this line.

```
PS C:\code\playground> cargo test
   Compiling playground v0.1.0 (C:\code\playground)
  --> src\main.rs:17:19
   |
17 |             xs == reverse(&reverse(&xs))
   |                   ^^^^^^^ not found in this scope
   |
help: consider importing this function
   |
15 |     use crate::reverse;
   |
```
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant