Declare and initialize dateValue in the same line

This commit is contained in:
Patrick Farwick 2022-01-19 13:53:29 +00:00
parent 24df4b3e3d
commit 9267256e35

View File

@ -126,8 +126,7 @@ namespace Jellyfin.Plugin.Bookshelf.Providers
ReadStringInto("//dc:date", date =>
{
DateTime dateValue;
if (DateTime.TryParse(date, out dateValue))
if (DateTime.TryParse(date, out var dateValue))
{
book.PremiereDate = dateValue.Date;
book.ProductionYear = dateValue.Date.Year;