Skip to content

Fix return value for File::for_commandline_arg #145

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

Closed
wants to merge 1 commit into from

Conversation

GuillaumeGomez
Copy link
Member

Fixes similar case of gtk-rs/gtk3-rs#351.

Comment on lines +549 to +550
[object.function.return]
nullable = true
Copy link
Member

Choose a reason for hiding this comment

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

This can never be nullable per the docs "This operation never fails, but the returned object might not support any I/O operation if arg points to a malformed path."

Copy link
Member Author

Choose a reason for hiding this comment

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

The issue seems to say otherwise though...

Copy link
Member Author

Choose a reason for hiding this comment

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

And the source code seems to do it too: https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gfile.c#L6728

The doc is lying.

@GuillaumeGomez
Copy link
Member Author

The problem isn't the returned value. Closing then.

@GuillaumeGomez GuillaumeGomez deleted the nullable-return-for_commandline_arg branch June 14, 2021 14:17
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.

2 participants