Skip to content
This repository has been archived by the owner on Jan 3, 2021. It is now read-only.

Commit

Permalink
Loosen requirement of update on Decoder from QueryableModel to …
Browse files Browse the repository at this point in the history
…`KeyPathQueryable`
  • Loading branch information
Obbut committed Mar 28, 2019
1 parent bc2196a commit 8084177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Meow/Updatable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ extension WritableKeyPath: OptionalKeyPath where Value: ExpressibleByNilLiteral

public extension Decoder {
/// - returns: An array containing the key paths that were updated
public func update<T: QueryableModel>(_ instance: T, withAllowedKeyPaths keyPaths: [MeowWritableKeyPath]) throws -> [PartialKeyPath<T>] {
public func update<T: KeyPathQueryable>(_ instance: T, withAllowedKeyPaths keyPaths: [MeowWritableKeyPath]) throws -> [PartialKeyPath<T>] {
let container = try self.container(keyedBy: UpdateCodingKey.self)

// must pass as inout to the KeyPath, hence the var
Expand Down

0 comments on commit 8084177

Please sign in to comment.