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

Make use of StaticString #238

Closed
wants to merge 1 commit into from
Closed

Make use of StaticString #238

wants to merge 1 commit into from

Conversation

Scvairy
Copy link

@Scvairy Scvairy commented Feb 13, 2024

For issue #237

@Scvairy Scvairy marked this pull request as ready for review February 13, 2024 13:02
Comment on lines +34 to +35
self.file = String(describing: file)
self.function = String(describing: function)
Copy link
Author

Choose a reason for hiding this comment

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

Because this struct is formed from CoreData it cannot contain StaticStrings, so we convert it to regular strings.

@kean
Copy link
Owner

kean commented Feb 18, 2024

Hey, thank you for opening the PR, @Scvairy.
Can you please elaborate a bit more on the advantages of using StaticString in this case? I wonder if the benefits still hold after conversion back to String.

I haven't used this type before, but it seems like a good candidate in the case of #file and #function. On the other hand, if the users want to override the default values, wouldn't StaticString be a bit more limiting?

@kean kean closed this Apr 13, 2024
@kean
Copy link
Owner

kean commented Apr 13, 2024

I'm going to close it for now. I'd be happy to merge if the rationale is provided for the change that would justify a breaking change in the public API.

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