From 1357bfc0f75482c08178a8877885dfb7938a4a2b Mon Sep 17 00:00:00 2001 From: Campion Fellin Date: Sun, 29 Nov 2020 10:38:46 -0800 Subject: [PATCH] Change View protol to CSVView for SwiftUI compatibility (#93) Closes https://github.com/swiftcsv/SwiftCSV/issues/89 Signed-off-by: campionfellin --- SwiftCSV/CSV.swift | 2 +- SwiftCSV/EnumeratedView.swift | 2 +- SwiftCSV/NamedView.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SwiftCSV/CSV.swift b/SwiftCSV/CSV.swift index c286ac2..7504da5 100644 --- a/SwiftCSV/CSV.swift +++ b/SwiftCSV/CSV.swift @@ -8,7 +8,7 @@ import Foundation -public protocol View { +public protocol CSVView { associatedtype Rows associatedtype Columns diff --git a/SwiftCSV/EnumeratedView.swift b/SwiftCSV/EnumeratedView.swift index 5c78cfa..15af23e 100644 --- a/SwiftCSV/EnumeratedView.swift +++ b/SwiftCSV/EnumeratedView.swift @@ -8,7 +8,7 @@ import Foundation -public struct EnumeratedView: View { +public struct EnumeratedView: CSVView { public struct Column { public let header: String diff --git a/SwiftCSV/NamedView.swift b/SwiftCSV/NamedView.swift index c18c1a5..55b5381 100644 --- a/SwiftCSV/NamedView.swift +++ b/SwiftCSV/NamedView.swift @@ -6,7 +6,7 @@ // Copyright © 2016 Naoto Kaneko. All rights reserved. // -public struct NamedView: View { +public struct NamedView: CSVView { public var rows: [[String : String]] public var columns: [String : [String]]