Skip to content

Basics: fix DiagnosticsHanderWrapper typo #5877

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

Merged
merged 2 commits into from
Nov 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Sources/Basics/Observability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public final class ObservabilityScope: DiagnosticsEmitterProtocol, CustomStringC
private let parent: ObservabilityScope?
private let metadata: ObservabilityMetadata?

private var diagnosticsHandler: DiagnosticsHanderWrapper
private var diagnosticsHandler: DiagnosticsHandlerWrapper

fileprivate init(
description: String,
Expand All @@ -77,7 +77,7 @@ public final class ObservabilityScope: DiagnosticsEmitterProtocol, CustomStringC
self.description = description
self.parent = parent
self.metadata = metadata
self.diagnosticsHandler = DiagnosticsHanderWrapper(diagnosticsHandler)
self.diagnosticsHandler = DiagnosticsHandlerWrapper(diagnosticsHandler)
}

public func makeChildScope(description: String, metadata: ObservabilityMetadata? = .none) -> Self {
Expand Down Expand Up @@ -127,7 +127,7 @@ public final class ObservabilityScope: DiagnosticsEmitterProtocol, CustomStringC
self.diagnosticsHandler.handleDiagnostic(scope: self, diagnostic: diagnostic)
}

private struct DiagnosticsHanderWrapper: DiagnosticsHandler {
private struct DiagnosticsHandlerWrapper: DiagnosticsHandler {
private let underlying: DiagnosticsHandler
private var _errorsReported = ThreadSafeBox<Bool>(false)

Expand Down Expand Up @@ -375,7 +375,7 @@ public struct Diagnostic: CustomStringConvertible {
/// Note that specific baggage and context types MAY (and usually do), offer also a way to set baggage values,
/// however in the most general case it is not required, as some frameworks may only be able to offer reading.

// FIXME: we currently requires that Value conforms to CustomStringConvertible which sucks
// FIXME: we currently require that Value conforms to CustomStringConvertible which sucks
// ideally Value would conform to Equatable but that has generic requirement
// luckily, this is about to change so we can clean this up soon
public struct ObservabilityMetadata: CustomDebugStringConvertible {
Expand Down