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

strv: Implement From for constant GStr slices #1114

Merged
merged 1 commit into from Jun 6, 2023

Conversation

A6GibKm
Copy link
Contributor

@A6GibKm A6GibKm commented Jun 3, 2023

This was implemented for GString and &str but not for &GStr.

This was implemented for GString and &str but not for &GStr.
@A6GibKm
Copy link
Contributor Author

A6GibKm commented Jun 3, 2023

Please let me know if the test is redundant.

@A6GibKm
Copy link
Contributor Author

A6GibKm commented Jun 3, 2023

For reference, this is the code that wasn't working

    glib::StrV::from([
        gio::FILE_ATTRIBUTE_STANDARD_NAME,
        gio::FILE_ATTRIBUTE_TIME_CREATED,
        gio::FILE_ATTRIBUTE_TIME_CREATED_USEC,
        gio::FILE_ATTRIBUTE_TIME_MODIFIED,
        gio::FILE_ATTRIBUTE_TIME_MODIFIED_USEC,
    ])
    .join(Some(","))

@jf2048
Copy link
Member

jf2048 commented Jun 3, 2023

This PR looks good but, for the use case of file attributes I think we should probably just make a macro at some point to match the C string concatting behavior

@sdroege sdroege merged commit c86404b into gtk-rs:master Jun 6, 2023
45 of 46 checks passed
@sdroege sdroege added the backported PR was backported to the current stable branch label Jun 6, 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.

None yet

3 participants