damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 6e6c1eb7b6f73e711d624b9b696f03fb54937978
parent 07dfa3b1fbc19457a86a1e60fea920f41031897c
Author: William Casarin <jb55@jb55.com>
Date:   Tue,  1 Aug 2023 16:28:48 -0700

ndb: make AsciiCharacter a CustomStringConvertible

Diffstat:
Mdamus/Nostr/ReferencedId.swift | 2+-
Mnostrdb/AsciiCharacter.swift | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/damus/Nostr/ReferencedId.swift b/damus/Nostr/ReferencedId.swift @@ -15,7 +15,7 @@ struct Reference { } func to_referenced_id() -> ReferencedId { - ReferencedId(ref_id: id.string(), relay_id: nil, key: key.string) + ReferencedId(ref_id: id.string(), relay_id: nil, key: key.description) } } diff --git a/nostrdb/AsciiCharacter.swift b/nostrdb/AsciiCharacter.swift @@ -7,14 +7,14 @@ import Foundation -struct AsciiCharacter: ExpressibleByStringLiteral, Equatable, Hashable { +struct AsciiCharacter: ExpressibleByStringLiteral, CustomStringConvertible, Equatable, Hashable { private let value: UInt8 var cchar: CChar { return CChar(bitPattern: value) } - var string: String { + var description: String { return String(UnicodeScalar(UInt8(bitPattern: cchar))) }