Skip to content

Commit

Permalink
omit superfluous type
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim committed May 16, 2017
1 parent 7918da7 commit 43e4ed6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/SwiftLintFramework/Models/LinterCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public final class LinterCache {
Key.version.rawValue: currentVersion.value,
Key.files.rawValue: [:]
]
cache[LinterCache.Key.configuration.rawValue] = configurationDescription
cache[Key.configuration.rawValue] = configurationDescription
}

public init(cache: Any, currentVersion: Version = .current, configurationDescription: String? = nil) throws {
Expand Down Expand Up @@ -58,12 +58,12 @@ public final class LinterCache {
}

lock.lock()
var filesCache = (cache[LinterCache.Key.files.rawValue] as? [String: Any]) ?? [:]
var filesCache = (cache[Key.files.rawValue] as? [String: Any]) ?? [:]
filesCache[file] = [
Key.violations.rawValue: violations.map(dictionary(for:)),
Key.lastModification.rawValue: lastModification.timeIntervalSinceReferenceDate
]
cache[LinterCache.Key.files.rawValue] = filesCache
cache[Key.files.rawValue] = filesCache
lock.unlock()
}

Expand All @@ -74,7 +74,7 @@ public final class LinterCache {

lock.lock()

guard let filesCache = cache[LinterCache.Key.files.rawValue] as? [String: Any],
guard let filesCache = cache[Key.files.rawValue] as? [String: Any],
let entry = filesCache[file] as? [String: Any],
let cacheLastModification = entry[Key.lastModification.rawValue] as? TimeInterval,
cacheLastModification == lastModification.timeIntervalSinceReferenceDate,
Expand Down

0 comments on commit 43e4ed6

Please sign in to comment.