Skip to content

Commit

Permalink
Move mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
sergdort committed Jul 22, 2017
1 parent 7b82e52 commit 58db3e4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Network/Cache/Cache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,9 @@ final class Cache<T: Encodable>: AbstractCache<T> where T == T.Encoder.DomainTyp
observer(.completed)
return Disposables.create()
}
let domainObjects = objects.map { obj in
return obj.asDomain()
}
observer(MaybeEvent.success(domainObjects))
return Disposables.create()
}.subscribeOn(chacheScheduler)
observer(MaybeEvent.success(objects.map { $0.asDomain() }))
return Disposables.create()
}.subscribeOn(chacheScheduler)
}

private func directoryURL() -> URL? {
Expand Down

0 comments on commit 58db3e4

Please sign in to comment.