Skip to content

Commit 58e04cd

Browse files
committed
perf: auto format by SwiftFormat
1 parent 5353522 commit 58e04cd

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

Easydict/Feature/Service/Ali/AliService.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class AliService: QueryService {
4646
override public func supportLanguagesDictionary() -> MMOrderedDictionary<AnyObject, AnyObject> {
4747
// TODO: Replace MMOrderedDictionary in the API
4848
let orderedDict = MMOrderedDictionary<AnyObject, AnyObject>()
49-
AliTranslateType.supportLanguagesDictionary.forEach { key, value in
49+
for (key, value) in AliTranslateType.supportLanguagesDictionary {
5050
orderedDict.setObject(value as NSString, forKey: key.rawValue as NSString)
5151
}
5252
return orderedDict

Easydict/Feature/Service/Caiyun/CaiyunService.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public final class CaiyunService: QueryService {
2727
override public func supportLanguagesDictionary() -> MMOrderedDictionary<AnyObject, AnyObject> {
2828
// TODO: Replace MMOrderedDictionary.
2929
let orderedDict = MMOrderedDictionary<AnyObject, AnyObject>()
30-
CaiyunTranslateType.supportLanguagesDictionary.forEach { key, value in
30+
for (key, value) in CaiyunTranslateType.supportLanguagesDictionary {
3131
orderedDict.setObject(value as NSString, forKey: key.rawValue as NSString)
3232
}
3333
return orderedDict

Easydict/Feature/Service/Tencent/TencentService.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public final class TencentService: QueryService {
2727
override public func supportLanguagesDictionary() -> MMOrderedDictionary<AnyObject, AnyObject> {
2828
// TODO: Replace MMOrderedDictionary in the API
2929
let orderedDict = MMOrderedDictionary<AnyObject, AnyObject>()
30-
TencentTranslateType.supportLanguagesDictionary.forEach { key, value in
30+
for (key, value) in TencentTranslateType.supportLanguagesDictionary {
3131
orderedDict.setObject(value as NSString, forKey: key.rawValue as NSString)
3232
}
3333
return orderedDict

Easydict/Feature/ViewController/View/ChangeFontSizeView/ChangeFontSizeView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ import Hue
7878
stackView.heightAnchor.constraint(equalToConstant: scaleLineHeight),
7979
])
8080

81-
scaleLines.enumerated().forEach { _, view in
81+
for (_, view) in scaleLines.enumerated() {
8282
view.layer?.cornerRadius = scaleLineWidth / 2
8383
view.layer?.backgroundColor = scaleLineColor.cgColor
8484

EasydictSwiftTests/EasydictSwiftTests.swift

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import XCTest
1010

1111
final class EasydictSwiftTests: XCTestCase {
12-
1312
override func setUpWithError() throws {
1413
// Put setup code here. This method is called before the invocation of each test method in the class.
1514
}
@@ -25,7 +24,7 @@ final class EasydictSwiftTests: XCTestCase {
2524
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
2625
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
2726
}
28-
27+
2928
func testAES() {
3029
let text = "123"
3130
let encryptedText = text.encryptAES()
@@ -39,5 +38,4 @@ final class EasydictSwiftTests: XCTestCase {
3938
// Put the code you want to measure the time of here.
4039
}
4140
}
42-
4341
}

0 commit comments

Comments
 (0)