BurntSushi / quickcheck

Automated property based testing for Rust (with shrinking).
The Unlicense
2.4k stars 149 forks source link

Fix simple example in README #314

Open lynn opened 1 year ago

lynn commented 1 year ago

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.