Skip to content

Remove unnecessary optional so example compiles - #501

Open
mattmassicotte wants to merge 1 commit into
apple:mainfrom
mattmassicotte:fix/optional-in-loghandler-example
Open

Remove unnecessary optional so example compiles#501
mattmassicotte wants to merge 1 commit into
apple:mainfrom
mattmassicotte:fix/optional-in-loghandler-example

Conversation

@mattmassicotte

Copy link
Copy Markdown

There's an unnecessary optional return here that prevents the example from compiling.

Motivation:

It took me a moment to figure out how to fix this, but in the end it was very straightforward. The prepareMetadata doesn't ever need to return nil.

Modifications:

A small type change fixes the compilation errors in log(event:)

Result:

The example in the documentation can now be used unmodified.

@FranzBusch FranzBusch added the semver/none No version bump required. label Aug 31, 2026
@FranzBusch
FranzBusch enabled auto-merge (squash) August 31, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants