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

glib: Bind g_unichar APIs #1146

Merged
merged 1 commit into from
Sep 4, 2023
Merged

glib: Bind g_unichar APIs #1146

merged 1 commit into from
Sep 4, 2023

Conversation

RealKC
Copy link
Contributor

@RealKC RealKC commented Jul 25, 2023

I'm not sure if documentation for these methods can be automatically generated given these are manually defined as methods on an extension trait.

I think I got all of the ones not offered by the stdlib

Closes #763


Some notes:

  • names were made "rustier", e.g.: g_unichar_istitle became is_titlecase
  • I did not include APIs that were already availabe through Rust's char

glib/src/auto/enums.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
@RealKC RealKC force-pushed the g_unichar branch 2 times, most recently from 84173f4 to 2a96562 Compare August 11, 2023 19:31
@RealKC
Copy link
Contributor Author

RealKC commented Aug 11, 2023

Regarding the CI failures:

  • can I tell typos to ignore either a specific file or specific line? I'd rather not ignore the paranthesis typo on the whole project (and where it is made, it is necessary)
  • do I need to add doc aliases to the impls for the functions too of the trait too? Seems strange

@sdroege
Copy link
Member

sdroege commented Aug 14, 2023

do I need to add doc aliases to the impls for the functions too of the trait too? Seems strange

You only need to add them on plain functions and trait declarations, not trait implementations.

can I tell typos to ignore either a specific file or specific line? I'd rather not ignore the paranthesis typo on the whole project (and where it is made, it is necessary)

Something for @bilelmoussaoui I guess :)

@bilelmoussaoui bilelmoussaoui added the needs-backport PR needs backporting to the current stable branch label Aug 14, 2023
@RealKC
Copy link
Contributor Author

RealKC commented Aug 22, 2023

Changes since last push:

  • rebased on top of master
  • addressed review comments

You only need to add them on plain functions and trait declarations, not trait implementations.

As far as I can tell, CI is now failing because the aliases don't exist in the trait impl

@RealKC
Copy link
Contributor Author

RealKC commented Aug 22, 2023

I rewrote the trait so that CI would be happy, seems to have worked

glib/src/unichar.rs Outdated Show resolved Hide resolved
bilelmoussaoui
bilelmoussaoui previously approved these changes Aug 23, 2023
@sdroege sdroege self-requested a review August 24, 2023 06:28
.typos.toml Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
glib/src/unichar.rs Outdated Show resolved Hide resolved
Some notes:
* names were made "rustier", e.g.:` g_unichar_istitle` became
`is_titlecase`
* I did not include APIs that were already availabe through Rust's char
@sdroege sdroege merged commit d85a225 into gtk-rs:master Sep 4, 2023
47 checks passed
@bilelmoussaoui bilelmoussaoui added backported PR was backported to the current stable branch and removed needs-backport PR needs backporting to the current stable branch labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported PR was backported to the current stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bind g_utf8 / g_unichar APIs
4 participants