Example error
cra1g opened this issue · 2 comments
cra1g commented
Hi,
When trying to run the example it gives the error
error: expected item, found keyword `let`
--> example.rs:4:1
|
4 | let oop_range = "22+,A2s+,A8o+,K7s+,K9o+,Q8s+,Q9o+,J8s+,J9o+,T8+,97+,86+,75+,64s+,65o,54,43s";
| ^^^ expected item
error: aborting due to previous error.
Or if I try to run cargo run it gives the following
postflop-solver % cargo run
error: a bin target must be available for `cargo run`
Is there a main.rs available for this project, or some instructions to run the example file?
Thanks!
b-inary commented
example.rs
is not written as a complete program (just like doc comments). If you want to run a program, you need to copy and paste the code into your main()
function in main.rs
.
Since you don't seem familiar with Rust, I would also advise that cargo run
is slower to run because it generates debug builds. To run an optimized executable, use cargo run --release
instead.
b-inary commented
The example.rs
notation is confusing, so I slightly modified the readme. Thanks for your opinion!