Skip to content

Commit

Permalink
Fixes some small mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez committed Apr 15, 2024
1 parent c721f8f commit 58caab5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions LocalPackages/PixelKit/Sources/PixelKit/PixelKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,14 @@ public final class PixelKit {

let newError: Error?

if let event = event as? PixelKitEventV2 {
if let event = event as? PixelKitEventV2,
let error = event.error {

// For v2 events we only consider the error specified in the event
// and purposedly ignore the parameter in this call.
// This is to encourage moving the error over to the protocol error
// instead of still relying on the parameter of this call.
newError = event.error
newError = error
} else {
newError = error
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public protocol PixelFiring {
frequency: PixelKit.Frequency) async throws -> Bool
}


extension PixelKit: PixelFiring {
@discardableResult
public func fire(_ event: PixelKitEventV2) async throws -> Bool {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// PixelFireMock.swift
// PixelKitMock.swift
//
// Copyright © 2024 DuckDuckGo. All rights reserved.
//
Expand Down

0 comments on commit 58caab5

Please sign in to comment.