Skip to content

add type assertion to logger#43

Merged
garmr-ulfr merged 1 commit intomainfrom
add-type-check
Sep 27, 2025
Merged

add type assertion to logger#43
garmr-ulfr merged 1 commit intomainfrom
add-type-check

Conversation

@garmr-ulfr
Copy link
Copy Markdown
Collaborator

Just adds type assertion

@garmr-ulfr garmr-ulfr marked this pull request as ready for review September 27, 2025 02:21
Copilot AI review requested due to automatic review settings September 27, 2025 02:21
@garmr-ulfr garmr-ulfr merged commit 37f8a37 into main Sep 27, 2025
1 check passed
@garmr-ulfr garmr-ulfr deleted the add-type-check branch September 27, 2025 02:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the logger initialization in NewMutableURLTest to safely handle type assertions, replacing a direct type assertion with a type-safe check.

  • Replaces unsafe type assertion with safe type checking using the comma ok idiom
  • Conditionally creates a specialized logger factory only when the logger implements the sbxL.SLogger interface
  • Falls back to using the original logger when type assertion fails

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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