Use apply instead of let

This commit is contained in:
Shinokuni 2019-12-17 22:16:48 +01:00
parent 24134161ec
commit 10e38374a0
1 changed files with 4 additions and 6 deletions

View File

@ -20,12 +20,10 @@ object OPMLMatcher {
val feeds = arrayListOf<Feed>() val feeds = arrayListOf<Feed>()
outline.outlines?.forEach { feedOutline -> outline.outlines?.forEach { feedOutline ->
val feed = Feed().let { val feed = Feed().apply {
it.name = feedOutline.title name = feedOutline.title
it.url = feedOutline.xmlUrl url = feedOutline.xmlUrl
it.siteUrl = feedOutline.htmlUrl siteUrl = feedOutline.htmlUrl
it
} }
feeds.add(feed) feeds.add(feed)