Sudoku: GlyphCache error
In the tutorial it says to import opengl_graphics::glyph_cache::GlyphCache. This doesn't seem to exist anymore. What exists instead is opengl_graphics::GlyphCache.
Also the constructor of GlyphCache takes three arguments instead of two. There is a factory needed.
How can I compile the code? I cannot find anything about the factory. Also I followed the tutorial step by step.
Maybe problems like these can be solved in the future with adding versions to the dependencies. As piston seems to change very fast, specific library versions can make sure that the tutorial still works, even when newer versions of piston or any dependency came out. :-)
PS: I found opengl_graphics::graphics::glyph_cache::rusttype::GlyphCache, but it seems to be the same struct as opengl_graphics::GlyphCache.
Okay, piston2d-opengl_graphics 0.46.0 seems to be the last version that still had opengl_graphics::glyph_cache::GlyphCache. There is no combination of dependencies that could run the last Sudoku chapter, where the font is being added. Going through the versions it looked like every week new breaking changes occur.
It seems that this was fixed in adc06df9c895cb29f44d3039cb70186c59769e76.
With the latest version of piston2d-opengl_graphics (0.70.0), the app panics when running cargo run. This is the error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnrecognizedFormat', src/libcore/result.rs:1187:5