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

Provide examples for all window position/size setters #2107

Merged
merged 1 commit into from Jan 2, 2022

Conversation

rukai
Copy link
Contributor

@rukai rukai commented Dec 23, 2021

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • cargo doc builds successfully
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

This API is easy to understand once you've seen an example, but figuring it out from just the type signature is really difficult.
So every method with args of <S: Into<Size>> or <P: Into<Position>> should have an example demonstrating how to use it.

I considered putting this documentation just once in Size or Position.
But that would have been strange as we would be documenting how to instantiate a different type on a types documentation page.
And it would be harder to find for the user.

src/platform/unix.rs Outdated Show resolved Hide resolved
@rukai rukai force-pushed the improve_size_position_docs branch 2 times, most recently from a22395b to fac5574 Compare December 24, 2021 08:30
@maroider maroider self-requested a review December 27, 2021 08:07
Copy link
Member

@maroider maroider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is ready to be merged now?

@rukai
Copy link
Contributor Author

rukai commented Jan 1, 2022

from my perspective yes

Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also from mine, thanks for your work!

@maroider maroider merged commit 5331397 into rust-windowing:master Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants