From 10e38374a0f5a1f9313f84355761efe74746463d Mon Sep 17 00:00:00 2001 From: Shinokuni Date: Tue, 17 Dec 2019 22:16:48 +0100 Subject: [PATCH] Use apply instead of let --- .../com/readrops/app/utils/matchers/OPMLMatcher.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/readrops/app/utils/matchers/OPMLMatcher.kt b/app/src/main/java/com/readrops/app/utils/matchers/OPMLMatcher.kt index ebe252fa..0a2f241b 100644 --- a/app/src/main/java/com/readrops/app/utils/matchers/OPMLMatcher.kt +++ b/app/src/main/java/com/readrops/app/utils/matchers/OPMLMatcher.kt @@ -20,12 +20,10 @@ object OPMLMatcher { val feeds = arrayListOf() outline.outlines?.forEach { feedOutline -> - val feed = Feed().let { - it.name = feedOutline.title - it.url = feedOutline.xmlUrl - it.siteUrl = feedOutline.htmlUrl - - it + val feed = Feed().apply { + name = feedOutline.title + url = feedOutline.xmlUrl + siteUrl = feedOutline.htmlUrl } feeds.add(feed)