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>()
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)