From cb2b478bff20cb3214fb9b21cc1bf23a0d7a678f Mon Sep 17 00:00:00 2001 From: CMK Date: Thu, 4 Feb 2021 14:57:16 +0800 Subject: [PATCH] chore: remove implicit optional unwrap --- Mastodon/Extension/CoreDataStack/Toot.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mastodon/Extension/CoreDataStack/Toot.swift b/Mastodon/Extension/CoreDataStack/Toot.swift index f71fa949e..2fab537e6 100644 --- a/Mastodon/Extension/CoreDataStack/Toot.swift +++ b/Mastodon/Extension/CoreDataStack/Toot.swift @@ -22,7 +22,7 @@ extension Toot.Property { spoilerText: entity.spoilerText, reblogsCount: NSNumber(value: entity.reblogsCount), favouritesCount: NSNumber(value: entity.favouritesCount), - repliesCount: (entity.repliesCount != nil) ? NSNumber(value: entity.repliesCount!) : nil, + repliesCount: entity.repliesCount.flatMap { NSNumber(value: $0) }, url: entity.uri, inReplyToID: entity.inReplyToID, inReplyToAccountID: entity.inReplyToAccountID,