Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bilelmoussaoui
Copy link
Member

  • objects: It uses to print the type name: not useful at all
  • enums: It does print what a debug impl would print
  • flags: It does print what a debug impl would print

So just get rid of that generated code and let the bindings generate a display impl manually when it makes sense

- objects: It uses to print the type name: not useful at all
- enums: It does print what a debug impl would print
- flags: It does print what a debug impl would print

So just get rid of that generated code and let the bindings generate a display
impl manually when it makes sense
@bilelmoussaoui
Copy link
Member Author

Note that the special display implementations are kept, if the type has a to_string / name or similarly named methods. I won't touch these

@sdroege
Copy link
Member

sdroege commented Aug 16, 2023

Yes keeping those is a good idea.

@pbor
Copy link
Contributor

pbor commented Aug 16, 2023

could it be worth to have a display_method = ... in Gir.toml instead of manually overriding?
Eg for GFile it would point to parse_name

(This can also be a follow up)

@bilelmoussaoui
Copy link
Member Author

Sure, not going to do that though :) it shouldn't be too difficult to add a new config that make the configured function name used in the display impl

@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/no-more-display branch from 2302c6c to f613ce6 Compare August 16, 2023 09:27
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/no-more-display branch 3 times, most recently from 8fe7aa3 to ff23a44 Compare August 16, 2023 09:50
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/no-more-display branch from ff23a44 to a89a202 Compare August 16, 2023 09:50
@bilelmoussaoui
Copy link
Member Author

should be good to go :)

@bilelmoussaoui bilelmoussaoui merged commit 33ab47b into master Aug 24, 2023
@bilelmoussaoui bilelmoussaoui deleted the bilelmoussaoui/no-more-display branch August 24, 2023 20:03
@arcnmx arcnmx mentioned this pull request May 24, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants