From d2f9eaa00b47888a684c9a91836501fd7ea7e141 Mon Sep 17 00:00:00 2001 From: James Bean Date: Wed, 14 Aug 2019 09:59:18 +0200 Subject: [PATCH] Conform Stack to CustomStringConvertible (#213) --- Sources/DataStructures/Stack.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sources/DataStructures/Stack.swift b/Sources/DataStructures/Stack.swift index e67fc77..bf25f8a 100644 --- a/Sources/DataStructures/Stack.swift +++ b/Sources/DataStructures/Stack.swift @@ -134,6 +134,16 @@ extension Stack: ExpressibleByArrayLiteral { } } +extension Stack: CustomStringConvertible { + + // MARK: - CustomStringConvertible + + /// - Returns: The printed description of this `Stack`. + public var description: String { + return elements.description + } +} + extension Stack: Additive { // MARK: - Additive