File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Sources/AWSLambdaRuntimeCore Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ extension LambdaRuntime {
194194 > (
195195 encoder: Encoder ,
196196 decoder: Decoder ,
197- body: @escaping ( Event , LambdaContext ) async throws -> Output
197+ body: sending @escaping ( Event , LambdaContext ) async throws -> Output
198198 )
199199 where
200200 Handler == LambdaCodableAdapter <
@@ -220,7 +220,7 @@ extension LambdaRuntime {
220220 /// - body: The handler in the form of a closure.
221221 public convenience init < Event: Decodable , Decoder: LambdaEventDecoder > (
222222 decoder: Decoder ,
223- body: @escaping ( Event , LambdaContext ) async throws -> Void
223+ body: sending @escaping ( Event , LambdaContext ) async throws -> Void
224224 )
225225 where
226226 Handler == LambdaCodableAdapter <
Original file line number Diff line number Diff line change @@ -88,15 +88,16 @@ struct LambdaRequestID {
8888 }
8989
9090 /// thread safe secure random number generator.
91- private static var generator = SystemRandomNumberGenerator ( )
9291 private static func generateRandom( ) -> Self {
92+ var generator = SystemRandomNumberGenerator ( )
93+
9394 var _uuid : uuid_t = LambdaRequestID . null
9495 // https://tools.ietf.org/html/rfc4122#page-14
9596 // o Set all the other bits to randomly (or pseudo-randomly) chosen
9697 // values.
9798 withUnsafeMutableBytes ( of: & _uuid) { ptr in
98- ptr. storeBytes ( of: Self . generator. next ( ) , toByteOffset: 0 , as: UInt64 . self)
99- ptr. storeBytes ( of: Self . generator. next ( ) , toByteOffset: 8 , as: UInt64 . self)
99+ ptr. storeBytes ( of: generator. next ( ) , toByteOffset: 0 , as: UInt64 . self)
100+ ptr. storeBytes ( of: generator. next ( ) , toByteOffset: 8 , as: UInt64 . self)
100101 }
101102
102103 // o Set the four most significant bits (bits 12 through 15) of the
You can’t perform that action at this time.
0 commit comments