mjdv / ocmu64

Submission for PACE Challenge 2024
MIT License
3 stars 0 forks source link

Compilation error #1

Open PhKindermann opened 2 weeks ago

PhKindermann commented 2 weeks ago

Hey,

I get the following compilation error:

Compiling ocmu64 v0.1.0 (/home/philipp/2024-pace-submissions/exact/16-mjdv/ocmu64-pace-2024)
error[E0599]: no method named `chunk_by` found for mutable reference `&mut Vec<node::Node<node::BT>>` in the current scope
   --> src/graph.rs:167:18
    |
167 |         solution.chunk_by(|l, r| l.next() == *r).for_each(|slice| {
    |                  ^^^^^^^^ help: there is a method with a similar name: `chunks`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `ocmu64` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...

Any idea what's going wrong? (I have never used Rust before unfortunately)

RagnarGrootKoerkamp commented 2 weeks ago

Hey,

This was recently stabilized, in Rust 1.77, which released March 21. Are you using rust via rustup? If so, try rustup update stable.

If you're using, say, a debian packed version that's a bit behind, I can rewrite the code to not use this function.

PhKindermann commented 2 weeks ago

That worked, thank you! I had Rust 1.75 installed via apt, I now uninstalled it and used rustup to install Rust 1.77 and the code compiled.