Skip to content

Commit e21ee85

Browse files
committed
remove Span<UInt8> inits
1 parent 7d99212 commit e21ee85

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

Sources/JSONParsing/JSON.Array (ext).swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ extension JSON.Array {
66
public init(parsing json: JSON) throws {
77
self.init(try JSON.NodeRule<Int>.Array.parse(json.utf8))
88
}
9-
/// Attempts to parse a JSON array from a span
10-
public init(parsing span: Span<UInt8>) throws {
11-
self.init(
12-
try span.withUnsafeBufferPointer { buffer in
13-
try JSON.NodeRule<Int>.Array.parse(buffer)
14-
}
15-
)
16-
}
179
/// Attempts to parse a JSON array from a raw span
1810
public init(parsing span: RawSpan) throws {
1911
self.init(

Sources/JSONParsing/JSON.Node (ext).swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ extension JSON.Node {
88
self = try JSON.RootRule<Int>.parse(json.utf8)
99
}
1010
/// Attempts to parse a complete JSON message (either an ``Array`` or an
11-
/// ``Object``) from a span.
12-
public init(parsing span: Span<UInt8>) throws {
13-
self = try span.withUnsafeBufferPointer { buffer in
14-
try JSON.RootRule<Int>.parse(buffer)
15-
}
16-
}
17-
/// Attempts to parse a complete JSON message (either an ``Array`` or an
1811
/// ``Object``) from a raw span.
1912
public init(parsing span: RawSpan) throws {
2013
self = try span.withUnsafeBytes { buffer in

Sources/JSONParsing/JSON.Object (ext).swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ extension JSON.Object {
99
public init(parsing json: JSON) throws {
1010
self.init(try JSON.NodeRule<Int>.Object.parse(json.utf8))
1111
}
12-
/// Attempts to parse a JSON object from a span.
13-
public init(parsing span: Span<UInt8>) throws {
14-
self.init(
15-
try span.withUnsafeBufferPointer { buffer in
16-
try JSON.NodeRule<Int>.Object.parse(buffer)
17-
}
18-
)
19-
}
2012
/// Attempts to parse a JSON object from a raw span.
2113
public init(parsing span: RawSpan) throws {
2214
self.init(

0 commit comments

Comments
 (0)