Swift format, swift 5.3
This commit is contained in:
@@ -42,15 +42,15 @@ extension HBMustacheTemplate: Equatable {
|
||||
extension HBMustacheTemplate.Token: Equatable {
|
||||
public static func == (lhs: HBMustacheTemplate.Token, rhs: HBMustacheTemplate.Token) -> Bool {
|
||||
switch (lhs, rhs) {
|
||||
case let (.text(lhs), .text(rhs)):
|
||||
case (.text(let lhs), .text(let rhs)):
|
||||
return lhs == rhs
|
||||
case let (.variable(lhs, lhs2), .variable(rhs, rhs2)):
|
||||
case (.variable(let lhs, let lhs2), .variable(let rhs, let rhs2)):
|
||||
return lhs == rhs && lhs2 == rhs2
|
||||
case let (.section(lhs1, lhs2, lhs3), .section(rhs1, rhs2, rhs3)):
|
||||
case (.section(let lhs1, let lhs2, let lhs3), .section(let rhs1, let rhs2, let rhs3)):
|
||||
return lhs1 == rhs1 && lhs2 == rhs2 && lhs3 == rhs3
|
||||
case let (.invertedSection(lhs1, lhs2, lhs3), .invertedSection(rhs1, rhs2, rhs3)):
|
||||
case (.invertedSection(let lhs1, let lhs2, let lhs3), .invertedSection(let rhs1, let rhs2, let rhs3)):
|
||||
return lhs1 == rhs1 && lhs2 == rhs2 && lhs3 == rhs3
|
||||
case let (.partial(name1, indent1), .partial(name2, indent2)):
|
||||
case (.partial(let name1, let indent1), .partial(let name2, let indent2)):
|
||||
return name1 == name2 && indent1 == indent2
|
||||
default:
|
||||
return false
|
||||
|
||||
@@ -222,7 +222,7 @@ final class TemplateRendererTests: XCTestCase {
|
||||
""")
|
||||
let object: [String: Any] = ["repo": [["name": "resque"], ["name": "hub"], ["name": "rip"]]]
|
||||
let date = Date()
|
||||
for _ in 1 ... 10000 {
|
||||
for _ in 1...10000 {
|
||||
_ = template.render(object)
|
||||
}
|
||||
print(-date.timeIntervalSinceNow)
|
||||
|
||||
Reference in New Issue
Block a user