We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76791ef commit 324c93fCopy full SHA for 324c93f
1 file changed
Sources/Vexil/Diagnostics.swift
@@ -38,12 +38,11 @@ extension Array where Element == FlagPoleDiagnostic {
38
39
/// Creates diagnostic cases from a changed snapshot
40
init<Root> (changed: Snapshot<Root>, sources: [String]?) where Root: FlagContainer {
41
- let changedBy: String?
42
- if let sources = sources {
43
- changedBy = Set(sources).sorted().joined(separator: ", ")
44
- } else {
45
- changedBy = nil
+ guard let sources = sources else {
+ self = .init(current: changed)
+ return
46
}
+ let changedBy = Set(sources).sorted().joined(separator: ", ")
47
48
self = changed.values
49
.sorted(by: { $0.key < $1.key })
0 commit comments