[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with minimal-winit example (but really all examples) get_frame_mut is not a defined method #313

Open
Atovange opened this issue Oct 16, 2022 · 4 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed question Usability question

Comments

@Atovange
Copy link

on line 48 you have:
world.draw(pixels.get_frame_mut());
but this method is not defined on the struct Pixels (I only see get_frame on the documentation)

I see the changes on all examples were made by @squ1dd13 two months ago

I'm sorry if I'm missing something and I don't get it

@squ1dd13
Copy link
Contributor

get_frame_mut is defined in the current source (see here), but it wasn't defined in the version that the docs were built from. The documentation on docs.rs is for the last release (0.9.0), which doesn't include the most recent source changes - most notably the change from get_frame to get_frame_mut.

If you want to see the examples as they were when 0.9.0 was released, view the repository as it was at that point.

Sorry about the confusion. Hopefully that clears things up.

@Atovange
Copy link
Author

Ok I get it thanks for the clarification.
But shouldn't the examples linked on the crates.io page give you code coherent with the latest release?

@squ1dd13
Copy link
Contributor

That's a very good point. @parasyte Any ideas on how this could be fixed? It's not great for the crates.io page to be directing people to example code that will only work if they pull in the crate through git.

I didn't really consider this when I made my earlier pull request. Oops.

@parasyte
Copy link
Owner
parasyte commented Oct 17, 2022

It’s a good question! The readme simply uses relative links, which just goes to the examples on the head of the main branch. I don’t know of an easy way to link to the tags without maintaining the links by hand for each release. If anyone has any ideas, I’m open to making the improvement!

See also #311 (comment) where this was mentioned recently with slightly different (but still confusing) results with the examples.

@parasyte parasyte added documentation Improvements or additions to documentation help wanted Extra attention is needed question Usability question labels Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed question Usability question
Projects
None yet
Development

No branches or pull requests

3 participants