PistonDevelopers / glfw-rs

GLFW3 bindings and idiomatic wrapper for Rust.
Apache License 2.0
645 stars 123 forks source link

The example on crates.io/crates/glfw and the Github repo seems to be broken #558

Closed lachsdachs closed 8 months ago

lachsdachs commented 8 months ago

Line six of the example does not compile on the latest version (0.54.0 at the time of writing). It seems like it should be let mut glfw = glfw::init(glfw::fail_on_errors).unwrap(); instead of let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap();

Compilation failed with the following error: cannot find value "FAIL_ON_ERRORS" in crate "glfw"

bohdloss commented 8 months ago

You're right, and a pull request is already open to fix this issue. The problem is only the readme btw, you should be able to use the lowercase version of the function. Sorry for the inconvenience! I changed this a while ago and it looks like i forgot to also update the readme.