@@ -65,33 +65,31 @@ extension AsyncSequence where Element == ArraySlice<UInt8>, Self: Sendable {
65
65
///
66
66
/// Use this method if the event's `data` field is not JSON, or if you don't want to parse it using `asDecodedServerSentEventsWithJSONData`.
67
67
/// - Returns: A sequence that provides the events.
68
- @available ( * , deprecated, renamed: " asDecodedServerSentEvents(while:) " )
69
- @ _disfavoredOverload public func asDecodedServerSentEvents( ) -> ServerSentEventsDeserializationSequence <
68
+ @available ( * , deprecated, renamed: " asDecodedServerSentEvents(while:) " ) @ _disfavoredOverload
69
+ public func asDecodedServerSentEvents( ) -> ServerSentEventsDeserializationSequence <
70
70
ServerSentEventsLineDeserializationSequence < Self >
71
71
> { asDecodedServerSentEvents ( while: { _ in true } ) }
72
-
73
72
/// Returns another sequence that decodes each event's data as the provided type using the provided decoder.
74
73
///
75
74
/// Use this method if the event's `data` field is JSON.
76
75
/// - Parameters:
77
76
/// - dataType: The type to decode the JSON data into.
78
77
/// - decoder: The JSON decoder to use.
79
78
/// - Returns: A sequence that provides the events with the decoded JSON data.
80
- @available ( * , deprecated, renamed: " asDecodedServerSentEventsWithJSONData(of:decoder:while:) " )
81
- @ _disfavoredOverload public func asDecodedServerSentEventsWithJSONData< JSONDataType: Decodable > (
79
+ @available ( * , deprecated, renamed: " asDecodedServerSentEventsWithJSONData(of:decoder:while:) " ) @ _disfavoredOverload
80
+ public func asDecodedServerSentEventsWithJSONData< JSONDataType: Decodable > (
82
81
of dataType: JSONDataType . Type = JSONDataType . self,
83
82
decoder: JSONDecoder = . init( )
84
83
) -> AsyncThrowingMapSequence <
85
84
ServerSentEventsDeserializationSequence < ServerSentEventsLineDeserializationSequence < Self > > ,
86
85
ServerSentEventWithJSONData < JSONDataType >
87
- > {
88
- asDecodedServerSentEventsWithJSONData ( of: dataType, decoder: decoder, while: { _ in true } )
89
- }
86
+ > { asDecodedServerSentEventsWithJSONData ( of: dataType, decoder: decoder, while: { _ in true } ) }
90
87
}
91
88
92
89
extension ServerSentEventsDeserializationSequence {
93
90
/// Creates a new sequence.
94
91
/// - Parameter upstream: The upstream sequence of arbitrary byte chunks.
95
- @available ( * , deprecated, renamed: " init(upstream:while:) " )
96
- @_disfavoredOverload public init ( upstream: Upstream ) { self . init ( upstream: upstream, while: { _ in true } ) }
92
+ @available ( * , deprecated, renamed: " init(upstream:while:) " ) @_disfavoredOverload public init ( upstream: Upstream ) {
93
+ self . init ( upstream: upstream, while: { _ in true } )
94
+ }
97
95
}
0 commit comments