From 1ea48e62e66f9429ad2a478c0275188920fb2965 Mon Sep 17 00:00:00 2001 From: mtj0928 Date: Wed, 31 Dec 2025 10:23:24 +0900 Subject: [PATCH] Rename protocol --- Sources/SGFKit/Collection.swift | 2 +- Sources/SGFKit/Node.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/SGFKit/Collection.swift b/Sources/SGFKit/Collection.swift index f6ebf0b..925e447 100644 --- a/Sources/SGFKit/Collection.swift +++ b/Sources/SGFKit/Collection.swift @@ -35,7 +35,7 @@ public final class Collection { } } -extension Collection: NodeDelegate { +extension Collection: NodeProtocol { var number: Int? { -1 } diff --git a/Sources/SGFKit/Node.swift b/Sources/SGFKit/Node.swift index a711f6c..cdf7aa6 100644 --- a/Sources/SGFKit/Node.swift +++ b/Sources/SGFKit/Node.swift @@ -1,4 +1,4 @@ -protocol NodeDelegate: AnyObject { +protocol NodeProtocol: AnyObject { associatedtype Game: SGFKit.Game var number: Int? { get } @@ -20,7 +20,7 @@ public final class Node { /// The parent node of this node. public var parentNode: (Node)? { parent as? Node } - weak var parent: (any NodeDelegate)? + weak var parent: (any NodeProtocol)? /// The children of the node. /// @@ -101,7 +101,7 @@ public final class Node { } } -extension Node: NodeDelegate { +extension Node: NodeProtocol { func node(treeStructureDidUpdated index: Int?) { parent?.node(treeStructureDidUpdated: index) }