Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit45c240c

Browse files
committed
perf: improve performance ofdictionaryLiteral initializer of JSON
1 parent76f8d81 commit45c240c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Source/SwiftyJSON/SwiftyJSON.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ extension JSON: Swift.ExpressibleByFloatLiteral {
524524

525525
extensionJSON:Swift.ExpressibleByDictionaryLiteral{
526526
publicinit(dictionaryLiteral elements:(String,Any)...){
527-
letdictionary=elements.reduce(into:[String: Any](),{$0[$1.0]= $1.1})
527+
letdictionary=Dictionary(elements, uniquingKeysWith:{ $1})
528528
self.init(dictionary)
529529
}
530530
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp